diff options
-rwxr-xr-x | backup.in | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -108,18 +108,18 @@ do excludeArgs="${excludeArgs} --exclude ${toExclude}" done -if [ ! -e ${neues} ] +if [ ! -e ${neues}/wip ] then - mkdir ${neues} + mkdir -p ${neues}/wip fi -chmod 750 ${neues} -chown root:root ${neues} +chmod 750 ${neues}{,/wip} +chown root:root ${neues}{,/wip} if [ -z "${rsyncShell}" ] then rsync ${rsyncOptions} \ ${linkdests} \ ${excludeArgs} \ - ${Quelle} ${neues}/ + ${Quelle} ${neues}/wip/ sleep 1 rsync ${Quelle} else @@ -127,7 +127,7 @@ else ${rsyncOptions} \ ${linkdests} \ ${excludeArgs} \ - ${Quelle} ${neues}/ + ${Quelle} ${neues}/wip/ sleep 1 rsync "${rsyncShell}" ${Quelle} fi @@ -137,7 +137,8 @@ erg=$? if [ ${erg} -eq 0 ] || [ ${erg} -eq 24 ] then - mv ${neues} ${neues_Datum} + mv ${neues}/wip ${neues_Datum} + rmdir ${neues} rm ${pidFile} else rm ${pidFile} |