view deploy/any/run-cron-scripts.sh @ 1622:f3144e23ca1d live

Don't try to use cgitb, it just causes problems with Apache CGI interface
author Chris Cannam
date Fri, 10 Aug 2018 11:22:30 +0100
parents 44f001af7f6a
children
line wrap: on
line source
#!/bin/bash

set -e

cd /var/www/code

for t in minutely hourly daily monthly; do
    for s in deploy/config/cron.$t/[0-9]* ; do
        name=$(basename $s)
        actual="/etc/cron.$t/$name"
        echo "Running cron script $actual..."
        if "$actual"; then
            echo "Cron script $actual ran successfully"
        else
            echo "Cron script $actual failed with error code $?"
            exit 1
        fi
    done
done