From 527354f64e9e4c1bbe758b34802de83442012e87 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 30 Jul 2013 10:18:49 +0200 Subject: [PATCH] Generate PID name based on script name Fixes #533 --- cronjobs/run-crons.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cronjobs/run-crons.sh b/cronjobs/run-crons.sh index 2781b8d0..4340680d 100755 --- a/cronjobs/run-crons.sh +++ b/cronjobs/run-crons.sh @@ -9,9 +9,6 @@ # PHP Detections, if this fails hard code it PHP_BIN=$( which php ) -# Path to PID file, needs to be writable by user running this -PIDFILE='/tmp/mmcfe-ng-cron.pid' - # List of cruns to execute CRONS="findblock.php proportional_payout.php pplns_payout.php pps_payout.php blockupdate.php manual_payout.php auto_payout.php tickerupdate.php notifications.php statistics.php archive_cleanup.php" @@ -24,6 +21,12 @@ VERBOSE="0" # # ################################################################ +# My own name +ME=$( basename $0 ) + +# Path to PID file, needs to be writable by user running this +PIDFILE="/tmp/$ME.pid" + # Overwrite some settings via command line arguments while getopts "hvp:" opt; do case "$opt" in