From d29a9d70ac019be5aa43b7798a9ce8307c805601 Mon Sep 17 00:00:00 2001 From: first Date: Sun, 6 Jul 2025 08:20:55 +0000 Subject: [PATCH] Delete synterloper/uninstall_synterloper.sh --- synterloper/uninstall_synterloper.sh | 50 ---------------------------- 1 file changed, 50 deletions(-) delete mode 100644 synterloper/uninstall_synterloper.sh diff --git a/synterloper/uninstall_synterloper.sh b/synterloper/uninstall_synterloper.sh deleted file mode 100644 index a02883d..0000000 --- a/synterloper/uninstall_synterloper.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# uninstall_synterloper.sh -# -# This script stops the SYNterloper service and removes all its components. -# - -LOG_DIR="/var/log/synterloper" - -if [ "$(id -u)" -ne 0 ]; then - echo "Error: This script must be run as root." >&2 - exit 1 -fi - -echo "This script will stop the SYNterloper service and remove:" -echo " - The systemd/rc.d service file" -echo " - The daily cleanup cron job" -echo " - The log directory: ${LOG_DIR}" -printf "Proceed with uninstallation? (y/N) " -read -r confirmation -if [ "$confirmation" != "y" ] && [ "$confirmation" != "Y" ]; then - echo "Uninstallation aborted." - exit 0 -fi - -OS_TYPE=$(uname) -echo "Detected OS: ${OS_TYPE}" - -if [ "${OS_TYPE}" = "Linux" ]; then - echo "Stopping and disabling systemd service..." - systemctl stop synterloper.service - systemctl disable synterloper.service - rm -f /etc/systemd/system/synterloper.service - systemctl daemon-reload -elif [ "${OS_TYPE}" = "FreeBSD" ]; then - echo "Stopping and disabling rc.d service..." - service synterloper stop - sysrc -x synterloper_enable synterloper_port synterloper_logdir synterloper_rotate_sec synterloper_snaplen - rm -f /usr/local/etc/rc.d/synterloper -fi -echo "Service has been removed." - -echo "Removing cleanup cron job..." -rm -f /etc/cron.daily/synterloper-cleanup - -echo "Removing log directory..." -rm -rf "${LOG_DIR}" - -echo "" -echo "--- Uninstallation Complete ---" \ No newline at end of file