Exit with error if the script end with queue enable

This commit is contained in:
Jeremy Gardais 2020-06-03 17:51:31 +02:00
parent 1e2bbcea40
commit 104932b182
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 0 deletions

View File

@ -155,6 +155,12 @@ for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
is_queue_enable "${sge_hostname}" "${sge_queue_name}" \
&& disable_sge_queue "${sge_hostname}" "${sge_queue_name}"
## If the queue is still enable
### Exit with error
is_queue_enable "${sge_hostname}" "${sge_queue_name}" \
&& printf '%b\n' "${RED}ERROR ${sge_queue_name}@${sge_hostname} is still enable.${RESET}" \
&& exit 4
}
# }}}