summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-02-10 21:39:17 +0100
committerErich Eckner <git@eckner.net>2019-02-10 21:39:17 +0100
commit080efe8cbf8e5bc69a17f8af8f5feffd01dd67fe (patch)
tree57716bd5420c1d2e5d323d8f8d6eb4bb47a49fae
parentebcca25d68405456abcf95054a868e80b606c358 (diff)
downloadhardlinkedBackups-080efe8cbf8e5bc69a17f8af8f5feffd01dd67fe.tar.xz
backup.in: check if process which wrote pid file is actually (still) running
-rwxr-xr-xbackup.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/backup.in b/backup.in
index ca4c1ae..7497be4 100755
--- a/backup.in
+++ b/backup.in
@@ -150,7 +150,7 @@ if ${seldom}; then
fi
done
fi
-[ -e "${pidFile}" ] && exit 5
+[ -s "${pidFile}" ] && kill -0 $(cat "${pidFile}") 2>/dev/null && exit 5
echo $$ > "${pidFile}"