summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-02-04 15:04:57 +0100
committerErich Eckner <git@eckner.net>2020-02-04 15:08:02 +0100
commitd735a502e94bab371037bbeb2ee4629165a91023 (patch)
tree57e8580220f84f9cf1f3914a1fcffec3c7615557
parentfa87566422d7fef5b9b65685f63dc81e736faba5 (diff)
downloadhardlinkedBackups-d735a502e94bab371037bbeb2ee4629165a91023.tar.xz
backup: check if backup necessary *before* checking if destination is writable
-rwxr-xr-xbackup.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/backup.in b/backup.in
index 2c73947..21ff1b9 100755
--- a/backup.in
+++ b/backup.in
@@ -178,7 +178,6 @@ if [ ! "$(whoami)" == "root" ]; then
exit 3
fi
-[ -w "${Basis}" ] || exit 11
[ -e "${neues_Datum}" ] && exit 4
if ${seldom}; then
for date_diff in $(seq ${seldomness}); do
@@ -187,6 +186,7 @@ if ${seldom}; then
fi
done
fi
+[ -w "${Basis}" ] || exit 11
[ -s "${pidFile}" ] && kill -0 $(cat "${pidFile}") 2>/dev/null && exit 5
echo $$ > "${pidFile}"