Merge pull request #424 from TheSerapher/cronhome-detection

Adding CRONHOME detection to run-crons.sh
This commit is contained in:
Sebastian Grewe 2013-07-11 00:43:06 -07:00
commit 4b684ac45a

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"