fix: keep source checkout on non-purge uninstall
This commit is contained in:
+4
-1
@@ -39,8 +39,11 @@ for plugin in "${PLUGINS[@]}"; do
|
||||
unit="sub2api-$plugin.service"
|
||||
systemctl disable --now "$unit" 2>/dev/null || true
|
||||
rm -f "/etc/systemd/system/$unit"
|
||||
rm -rf "$PREFIX/$plugin"
|
||||
# Keep the checked-out source clean so a later install can fast-forward it.
|
||||
# Only generated binaries are removed unless --purge is explicitly used.
|
||||
rm -f "$PREFIX/$plugin/bin/$plugin"
|
||||
if $PURGE; then
|
||||
rm -rf "$PREFIX/$plugin"
|
||||
rm -f "$ETC_DIR/$plugin.env"
|
||||
rm -rf "$VAR_DIR/$plugin"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user