From 6d13e3976ab6977da4f03b1fc7a3283145440c9b Mon Sep 17 00:00:00 2001 From: new2f7 Date: Wed, 12 Jun 2024 13:30:49 +0200 Subject: [PATCH] Update uninstaller to remove all services files --- install.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index f6a3556..b941eb5 100755 --- a/install.sh +++ b/install.sh @@ -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" }