fix: harden backend synchronization
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user