removed lastsync bug fix. rsync runs when runed in shell

This commit is contained in:
root@saturn committed 2016-06-15 17:52:33 +02:00
1 parent d835155f98
commit d53accaad8
1 file changed
+2 -2
+2 -2
View File
@@ -25,8 +25,9 @@ exec 9>"${lock}"
flock -n 9 || exit
# only run rsync when there are changes
if diff -b <(curl -s "$lastupdate_url") "$target/lastupdate" >/dev/null; then
if diff -b <(curl -s "$lastupdate_url") "$target/lastupdate" >/dev/null && ! stty &>/dev/null; then
echo "rsync was not needed" >> $logfile
date +%s > $target/lastsync
else
echo "running rsync" >> $logfile
@@ -42,7 +43,6 @@ else
"${target}" &>> $logfile || fatal "Failed to sync."
fi
date +%s > $target/lastsync
echo "lastsync: $(date -d @$(cat ${target}/lastsync))" >> $logfile