Created
August 30, 2017 15:24
-
-
Save fdv/b3de9308649e10b498090f349a11c8be 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
if [ -f "${LOCK_FILE}" ]; then | |
log_error "A backup is already running with pid $(cat ${LOCK_FILE})" | |
echo $$ > "${LOCK_FILE}" | |
if [ $? -gt 0 ]; then | |
log_error "Error: could not create lock file, exiting" | |
fi | |
fi | |
# do all the logic here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment