Improve daily.sh robustness

This commit is contained in:
Job Snijders
2015-07-25 18:13:50 +02:00
parent 65abf8bd7a
commit 0e473d2538

View File

@@ -1,15 +1,17 @@
#!/bin/bash #!/usr/bin/env bash
cd $(dirname $0) || exit 1 set -eu
if [ $(php daily.php -f update) -eq 1 ]; then cd "$(dirname "$0")"
git pull --quiet
php includes/sql-schema/update.php if [ "$(php daily.php -f update)" -eq 1 ]; then
git pull --quiet
php includes/sql-schema/update.php
fi fi
php daily.php -f syslog php daily.php -f syslog
php daily.php -f eventlog php daily.php -f eventlog
php daily.php -f authlog php daily.php -f authlog
php daily.php -f perf_times php daily.php -f perf_times
php daily.php -f callback php daily.php -f callback
php daily.php -f device_perf php daily.php -f device_perf