Skip to content

Commit 50e16fc

Browse files
committed
[one-way-mirror] Uses a dedicated "already running" exit code
By using a dedicated exit code when script detects it is already running I make caller able to easily detect such non-erroneous state.
1 parent 6016f69 commit 50e16fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rsync/one-way-mirror/one-way-mirror-rsync.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fi
122122
exec 9>$lockFilepath
123123
if ! flock -n 9 ; then
124124
echo "I can tell $0 script is already running ($lockFilepath is present since $(stat -c %z $lockFilepath))... exiting this instance"
125-
exit 1
125+
exit 3
126126
fi
127127

128128

0 commit comments

Comments
 (0)