Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
caddy-lb-policy-switch: add instance check
Browse files Browse the repository at this point in the history
  • Loading branch information
kreatoo committed Jun 12, 2024
1 parent 99de874 commit 0996ea4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions caddy/caddy-lb-policy-switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ if [ ! -d /etc/glb ]; then
exit 1
fi

if [ -f "/tmp/caddy-lb-policy-switch.json" ]; then
echo "Instance of the script is already running"
exit
fi

for conf in /etc/glb/*.conf; do
[ ! -f "$conf" ] && continue

Expand Down

0 comments on commit 0996ea4

Please sign in to comment.