Files
global-autoresponder/scripts/uninstall.sh
T
2026-06-02 21:06:25 +02:00

19 lines
516 B
Bash
Executable File

#!/bin/sh
set -eu
BASE_DIR="/usr/local/hitme_plugins/global-autoresponders"
PLUGIN_DIR="/usr/local/directadmin/plugins/global-autoresponder"
CRON_FILE="/etc/cron.d/global-autoresponder"
if [ -x "$PLUGIN_DIR/scripts/backend.sh" ]; then
"$PLUGIN_DIR/scripts/backend.sh" da || true
fi
rm -f "$CRON_FILE"
if [ "${PURGE_GLOBAL_AUTORESPONDER_DATA:-0}" = "1" ]; then
rm -rf "$BASE_DIR"
echo "global-autoresponder data purged"
else
echo "global-autoresponder uninstalled; external data preserved at $BASE_DIR"
fi