diff options
author | Erich Eckner <git@eckner.net> | 2020-02-28 06:35:51 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-02-28 06:35:51 +0100 |
commit | af742511a6ba1d8dc3167a87eaa02fe953575dc7 (patch) | |
tree | 1cd072bb149818bce1c1d79ff0c802f7beb360a4 /update-me.in | |
parent | 005e5289d816b6ac91efea631804d99768b59dc1 (diff) | |
download | update-all-af742511a6ba1d8dc3167a87eaa02fe953575dc7.tar.xz |
update-me: exit 2 if no other update-me is running
Diffstat (limited to 'update-me.in')
-rw-r--r-- | update-me.in | 6 |
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 |