From 5d568a462118e03d1c192d241e6d50a7dd081b2a Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 11 Jul 2013 09:42:10 +0200 Subject: [PATCH] Adding CRONHOME detection to run-crons.sh This will ensure the cron will run without having to change the CRONHOME configuration. --- cronjobs/run-crons.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cronjobs/run-crons.sh b/cronjobs/run-crons.sh index e797cb44..ab1f482c 100755 --- a/cronjobs/run-crons.sh +++ b/cronjobs/run-crons.sh @@ -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"