From cc9a426761d20751be4992063d57f99b6e20a7c8 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 31 Jan 2018 12:41:16 +0100 Subject: [PATCH] library/roles/smartgears/dataminer_app/templates/algorithms-updater.j2: Fix the check_lock_file function. See https://support.d4science.org/issues/11079 --- smartgears/dataminer_app/templates/algorithms-updater.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartgears/dataminer_app/templates/algorithms-updater.j2 b/smartgears/dataminer_app/templates/algorithms-updater.j2 index 1dc27c29..866cfd54 100644 --- a/smartgears/dataminer_app/templates/algorithms-updater.j2 +++ b/smartgears/dataminer_app/templates/algorithms-updater.j2 @@ -38,7 +38,7 @@ function check_lock_file() { if [ -f $LOCK_FILE ] ; then set +o pipefail set +e - RUNNING_JOB=$( ps auwwx | grep `cat $LOCK_FILE` | grep -v grep ) + RUNNING_JOB=$( /bin/pidof -s -x /usr/local/bin/algorithms-updater ) RUNNING_JOB_RETVAL=$? if [ $RUNNING_JOB_RETVAL -eq 0 ] ; then logger 'algorithms-updater: another job still running, exiting.'