Adding CRONHOME detection to run-crons.sh

This will ensure the cron will run without having to change the CRONHOME
configuration.
This commit is contained in:
Sebastian Grewe 2013-07-11 09:42:10 +02:00
parent fdf97c8832
commit 5d568a4621

View File

@ -12,9 +12,6 @@ PHP_BIN=$( which php )
# Path to PID file, needs to be writable by user running this
PIDFILE='/tmp/mmcfe-ng-cron.pid'
# Location of our cronjobs, assume current directory
CRONHOME='.'
# List of cruns to execute
CRONS="findblock.php proportional_payout.php pplns_payout.php pps_payout.php blockupdate.php auto_payout.php tickerupdate.php notifications.php statistics.php archive_cleanup.php"
@ -30,6 +27,9 @@ VERBOSE="0"
# #
################################################################
# Find scripts path
CRONHOME=$( dirname $0 )
# Change working director to CRONHOME
if ! cd $CRONHOME 2>/dev/null; then
echo "Unable to change to working directory \$CRONHOME: $CRONHOME"