summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-02-28 06:35:51 +0100
committerErich Eckner <git@eckner.net>2020-02-28 06:35:51 +0100
commitaf742511a6ba1d8dc3167a87eaa02fe953575dc7 (patch)
tree1cd072bb149818bce1c1d79ff0c802f7beb360a4
parent005e5289d816b6ac91efea631804d99768b59dc1 (diff)
downloadupdate-all-af742511a6ba1d8dc3167a87eaa02fe953575dc7.tar.xz
update-me: exit 2 if no other update-me is running
-rw-r--r--update-me.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/update-me.in b/update-me.in
index 8fedef8..4c59d66 100644
--- a/update-me.in
+++ b/update-me.in
@@ -23,7 +23,11 @@ case $# in
rm "${safety_file}"
exit 0
fi
- exit 1
+ if pgrep -x update-me | grep -vxF $$; then
+ exit 1
+ else
+ exit 2
+ fi
;;
*)
usage