Skip to content

Commit

Permalink
Merge pull request #267 from new2f7/patch-3
Browse files Browse the repository at this point in the history
Update uninstaller to remove all services files
  • Loading branch information
deajan committed Sep 4, 2024
2 parents b1e08fe + 6d13e39 commit f094fb0
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -907,13 +907,22 @@ function RemoveAll {
else
Logger "Skipping removal of [$BIN_DIR/$SSH_FILTER] because other programs present that need it." "NOTICE"
fi
RemoveFile "$SERVICE_DIR_SYSTEMD_SYSTEM/$SERVICE_FILE_SYSTEMD_SYSTEM"
RemoveFile "$SERVICE_DIR_SYSTEMD_USER/$SERVICE_FILE_SYSTEMD_USER"
RemoveFile "$SERVICE_DIR_INIT/$SERVICE_FILE_INIT"

RemoveFile "$TARGET_HELPER_SERVICE_DIR_SYSTEMD_SYSTEM/$SERVICE_FILE_SYSTEMD_SYSTEM"
RemoveFile "$TARGET_HELPER_SERVICE_DIR_SYSTEMD_USER/$SERVICE_FILE_SYSTEMD_USER"
RemoveFile "$TARGET_HELPER_SERVICE_DIR_INIT/$SERVICE_FILE_INIT"
# Try to uninstall every possible service file
#if [ $init == "systemd" ]; then
RemoveFile "$SERVICE_DIR_SYSTEMD_SYSTEM/$SERVICE_FILE_SYSTEMD_SYSTEM"
RemoveFile "$SERVICE_DIR_SYSTEMD_USER/$SERVICE_FILE_SYSTEMD_USER"
RemoveFile "$SERVICE_DIR_SYSTEMD_SYSTEM/$TARGET_HELPER_SERVICE_FILE_SYSTEMD_SYSTEM"
RemoveFile "$SERVICE_DIR_SYSTEMD_USER/$TARGET_HELPER_SERVICE_FILE_SYSTEMD_USER"
#elif [ $init == "initV" ]; then
RemoveFile "$SERVICE_DIR_INIT/$SERVICE_FILE_INIT"
RemoveFile "$SERVICE_DIR_INIT/$TARGET_HELPER_SERVICE_FILE_INIT"
#elif [ $init == "openrc" ]; then
RemoveFile "$SERVICE_DIR_OPENRC/$SERVICE_FILE_OPENRC"
RemoveFile "$SERVICE_DIR_OPENRC/$TARGET_HELPER_SERVICE_FILE_OPENRC"
#else
#Logger "Can't uninstall from initV, systemd or openRC." "WARN"
#fi

Logger "Skipping configuration files in [$CONF_DIR]. You may remove this directory manually." "NOTICE"
}
Expand Down

0 comments on commit f094fb0

Please sign in to comment.