changeset 1616:44f001af7f6a live

Report success/failure
author Chris Cannam
date Tue, 05 Sep 2017 12:53:02 +0100
parents be8eb1d8201b
children 5584bee75daa
files deploy/any/run-cron-scripts.sh
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/any/run-cron-scripts.sh	Tue Sep 05 12:49:49 2017 +0100
+++ b/deploy/any/run-cron-scripts.sh	Tue Sep 05 12:53:02 2017 +0100
@@ -9,6 +9,11 @@
         name=$(basename $s)
         actual="/etc/cron.$t/$name"
         echo "Running cron script $actual..."
-        "$actual"
+        if "$actual"; then
+            echo "Cron script $actual ran successfully"
+        else
+            echo "Cron script $actual failed with error code $?"
+            exit 1
+        fi
     done
 done