diff --git a/sync-ispconfig-cleanup.sh b/sync-ispconfig-cleanup.sh index 5767baf..c407cb5 100755 --- a/sync-ispconfig-cleanup.sh +++ b/sync-ispconfig-cleanup.sh @@ -3,6 +3,13 @@ # ============================================================================== # ISPConfig Proxy Cleanup Script - Version 1.1 # ============================================================================== +LOCKFILE="/tmp/restart.cleanproxy.lock" + +# Sichern gegen Mehrfachstart +lockfile -r 0 "$LOCKFILE" || exit 1 + +# TRAP: Stellt sicher, dass das Lockfile bei JEDEM Beenden gelöscht wird +trap 'rm -f "$LOCKFILE"' EXIT # --- KONFIGURATION --- # Nutzt die zentrale Konfiguration des Proxy-Sync-Scripts