Created
September 18, 2018 16:50
-
-
Save panaggio/8028947723910751343bac1b12a3301e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec 9>/tmp/lock-file | |
if ! flock -n 9 ; then | |
(>&2 echo "another instance is running";) | |
exit 1 | |
fi | |
sleep 60 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment