diff --git a/cluster/sge.enable.host.queue.sh b/cluster/sge.enable.host.queue.sh index 3ea951a..5aeb598 100755 --- a/cluster/sge.enable.host.queue.sh +++ b/cluster/sge.enable.host.queue.sh @@ -406,19 +406,6 @@ main() { # {{{ && exit 0 fi - ## If we need to watch files - if [ "${CHECK_FILE}" -eq "0" ]; then - ## If nologin file exist (error on upgrade,…) - ### Exit - is_file_present "${file_nologin_path}" \ - && exit 0 - - ## If all SGE queue(s) were manually disabled (not any flag file) - ### Exit - is_file_absent "${sge_queue_flag_pattern}" \ - && exit 0 - fi - ## If we need to watch for processes if [ "${CHECK_PROCESS}" -eq "0" ]; then ## If anything related to APT is currently running @@ -439,6 +426,19 @@ main() { # {{{ || exit 4 fi + ## If we need to watch files + if [ "${CHECK_FILE}" -eq "0" ]; then + ## If nologin file exist (error on upgrade,…) + ### Exit + is_file_present "${file_nologin_path}" \ + && exit 0 + + ## If all SGE queue(s) were manually disabled (not any flag file) + ### Exit + is_file_absent "${sge_queue_flag_pattern}" \ + && exit 0 + fi + ## Simple debug message with color to valid current variables debug_message "main − Try to manage \ SGE queue(s): ${RED}${sge_queues_name_print:=/dev/null}${COLOR_DEBUG}\