Notepad:crontab: Difference between revisions
From Amar Wiki
(No difference)
| |
Latest revision as of 20:09, 11 August 2022
Schedule crontab with locks
if [ -d ${SOURCE} ]; then
if [ -d ${DEST} ]; then
(
/usr/bin/flock -x -w 10 200 || exit 1
/usr/bin/rsync -aq --delete-after ${SOURCE} ${DEST}.
) 200>/var/lock/.svnbackup.exclusivelock
else
echo "Dest dir $DEST doesn't exist"
fi
else
echo "Source dir $SOURCE doesn't exist"
fi
