]> arthur.ath.cx Git - backup-script.git/commitdiff
Enhance information messages
authorAlexander Barton <alex@barton.de>
Thu, 26 Sep 2013 13:06:48 +0000 (15:06 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 26 Sep 2013 13:06:52 +0000 (15:06 +0200)
bin/backup-script

index 9d8576d1b34fd636e2509a71bd766a73ef3a5590..00c4be64d41e18a2cd0f0e158b5319a12416acfb 100755 (executable)
@@ -212,8 +212,9 @@ for f in $sys; do
                && cmd="$cmd ${user}@${system}:/ $sys_target/" \
                || cmd="$cmd / $sys_target/"
 
-       echo "Calling: $cmd"
+       echo "Backing up to \"$sys_target\" ..."
        echo -n "Start date: "; date
+       echo "$cmd"
        count_started=$count_started+1
        rm -f "$sys_target/.stamp"
        
@@ -231,6 +232,7 @@ for f in $sys; do
                exit 1
        fi
 
+       echo -n "End date: "; date
        if [ $ret -eq 0 -o $ret -eq 24 ]; then
                [ $ret -eq 24 ] && count_ok_vanished=$count_ok_vanished+1
 
@@ -239,7 +241,6 @@ for f in $sys; do
        else
                echo "System \"$system\" completed with ERRORS, code $ret!"
        fi
-       echo -n "End date: "; date
 
        destinations="$destinations $target"
        echo
@@ -257,8 +258,10 @@ CleanUp
 
 echo -n "Done: "; date
 echo
-echo " - $count_all jobs defined,"
-echo " - $count_started jobs started,"
+[ $count_all -eq 1 ] && s="" || s="s"
+echo " - $count_all job$s defined,"
+[ $count_started -eq 1 ] && s="" || s="s"
+echo " - $count_started job$s started,"
 echo " - $count_ok done without errors."
 echo