#!/bin/ksh

cd $(dirname $0) || exit 1

if [ $(/usr/local/bin/php-5.6 daily.php -f update) -eq 1 ]; then 
  git pull --quiet
  /usr/local/bin/php-5.6 includes/sql-schema/update.php
fi

/usr/local/bin/php-5.6 daily.php -f syslog
/usr/local/bin/php-5.6 daily.php -f eventlog
/usr/local/bin/php-5.6 daily.php -f authlog
/usr/local/bin/php-5.6 daily.php -f perf_times 
/usr/local/bin/php-5.6 daily.php -f callback
php daily.php -f device_perf
