Commit 341df23f by Łukasz Nowak Committed by Łukasz Nowak

caddy-frontend: Cleanup PIDFILE after reload

1 parent f27a120e
......@@ -102,7 +102,7 @@ md5sum = ac17212a53be2c08ab84682ec665148d
[template-caddy-lazy-script-call]
filename = templates/apache-lazy-script-call.sh.in
md5sum = ebe5d3d19923eb812a40019cb11276d8
md5sum = b9f73f6323f9fceea054c46c854d2862
[template-graceful-script]
filename = templates/graceful-script.sh.in
......
......@@ -9,6 +9,7 @@ if [ ! -f $PIDFILE ]; then
echo $PID > $PIDFILE
sleep {{ wait_time }}
{{ lazy_command }}
rm -f $PIDFILE
else
ps --pid `cat $PIDFILE` &>/dev/null
if [ $? -eq 0 ]; then
......@@ -17,6 +18,7 @@ else
echo $PID > $PIDFILE
sleep {{ wait_time }}
{{ lazy_command }}
rm -f $PIDFILE
fi
fi
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!