Deal with non requested reboot (restart SGE earlier)

Check running processes earlier to restart SGE even after a non
requested reboot (power outage, system crash,…).
This commit is contained in:
Jeremy Gardais 2020-11-30 16:17:19 +01:00
parent ab742e8295
commit db0b6fcde9
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 13 additions and 13 deletions

View File

@ -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}\