From 80177c726bad7f37ddfe106242072a095c60c0e7 Mon Sep 17 00:00:00 2001 From: Andrey Arapov Date: Tue, 27 Jun 2023 10:06:14 +0200 Subject: [PATCH] use exec to handle the signals (fixes #274) --- snapshot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapshot.sh b/snapshot.sh index 109611538..3753cf4f3 100755 --- a/snapshot.sh +++ b/snapshot.sh @@ -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 @@ -108,7 +108,7 @@ while true; do fi echo "$TIME: Restarting server" - $SNAPSHOT_CMD & + exec $SNAPSHOT_CMD & PID=$! sleep 1s else