Merge pull request #1531 from job/robust_daily

Improve daily.sh robustness
This commit is contained in:
Daniel Preussker
2015-07-28 20:08:28 +00:00
+8 -6
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
git pull --quiet
php includes/sql-schema/update.php
cd "$(dirname "$0")"
if [ "$(php daily.php -f update)" -eq 1 ]; then
git pull --quiet
php includes/sql-schema/update.php
fi
php daily.php -f syslog
php daily.php -f eventlog
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 device_perf