From d735a502e94bab371037bbeb2ee4629165a91023 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 4 Feb 2020 15:04:57 +0100 Subject: backup: check if backup necessary *before* checking if destination is writable --- backup.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}" -- cgit v1.2.3-70-g09d2