diff --git a/cluster/sge.enable.host.queue.sh b/cluster/sge.enable.host.queue.sh index ec6073b..544a1ed 100755 --- a/cluster/sge.enable.host.queue.sh +++ b/cluster/sge.enable.host.queue.sh @@ -501,6 +501,16 @@ main() { # {{{ ## Define all vars according the selected options define_vars + ## If we need to watch for processes + if [ "${CHECK_PROCESS}" -eq "0" ]; then + ## If nothing related to SGE is currently running + ### Try to start the SGE execd systemd service + ### Exit with error if the service can't start + is_proc_running "${sge_proc_pattern}" \ + || systemctl --quiet start sge_execd.service > /dev/null 2>&1 \ + || exit 4 + fi + ## If we need to watch for upgrades if [ "${CHECK_UPGRADE}" -eq "0" ]; then ## If APT package upgrade is available @@ -530,13 +540,6 @@ main() { # {{{ ### Exit is_proc_running "${maco_proc_pattern}" \ && exit 0 - - ## If nothing related to SGE is currently running - ### Try to start the SGE execd systemd service - ### Exit with error if the service can't start - is_proc_running "${sge_proc_pattern}" \ - || systemctl --quiet start sge_execd.service > /dev/null 2>&1 \ - || exit 4 fi ## If we need to watch files