From 0a3abb363e86b7b019939b7a1f6fadb0c71bb4ce Mon Sep 17 00:00:00 2001 From: nicoschtein Date: Wed, 31 Jul 2013 03:01:33 -0300 Subject: [PATCH] Added Prefix Option to run-crons.sh PID File. Added configuration option 'PIDPREFIX' to add to PIDFILE name, so it will be unique in a multipool server. --- cronjobs/run-crons.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cronjobs/run-crons.sh b/cronjobs/run-crons.sh index 4340680d..715ecac4 100755 --- a/cronjobs/run-crons.sh +++ b/cronjobs/run-crons.sh @@ -15,6 +15,10 @@ CRONS="findblock.php proportional_payout.php pplns_payout.php pps_payout.php blo # Output additional runtime information VERBOSE="0" +# Prefix to add to PIDFILE name, so it will be unique in a multipool server. +# Can be left empty or set Eg. PIDPREFIX="LTC" / PIDPREFIX="DMD" +PIDPREFIX="" + ################################################################ # # # You probably don't need to change anything beyond this point # @@ -25,7 +29,7 @@ VERBOSE="0" ME=$( basename $0 ) # Path to PID file, needs to be writable by user running this -PIDFILE="/tmp/$ME.pid" +PIDFILE="/tmp/$PIDPREFIX$ME.pid" # Overwrite some settings via command line arguments while getopts "hvp:" opt; do