Skip to content

Commit

Permalink
use exec to handle the signals (fixes #274)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy108369 committed Jun 27, 2023
1 parent 1dc2243 commit 80177c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ DOW=$(date +%u)

echo "$TIME: Starting server"
echo "$TIME: Snapshot will run at $SNAPSHOT_TIME on day $SNAPSHOT_DAY"
$SNAPSHOT_CMD &
exec $SNAPSHOT_CMD &
PID=$!

while true; do
Expand Down Expand Up @@ -108,7 +108,7 @@ while true; do
fi

echo "$TIME: Restarting server"
$SNAPSHOT_CMD &
exec $SNAPSHOT_CMD &
PID=$!
sleep 1s
else
Expand Down

0 comments on commit 80177c7

Please sign in to comment.