only start if exit code != 0

This commit is contained in:
m0duspwnens
2022-04-11 16:03:00 -04:00
parent d102ca298d
commit d68b6e7c9a

View File

@@ -35,13 +35,14 @@ check_err() {
[[ $ERR_HANDLED == true ]] && exit $exit_code [[ $ERR_HANDLED == true ]] && exit $exit_code
if [[ $exit_code -ne 0 ]]; then
set +e set +e
systemctl_func "start" "$cron_service_name" systemctl_func "start" "$cron_service_name"
systemctl_func "start" "salt-master" systemctl_func "start" "salt-master"
systemctl_func "start" "salt-minion" systemctl_func "start" "salt-minion"
enable_highstate enable_highstate
if [[ $exit_code -ne 0 ]]; then
printf '%s' "Soup failed with error $exit_code: " printf '%s' "Soup failed with error $exit_code: "
case $exit_code in case $exit_code in
2) 2)