diff --git a/remove-fatal-errors-in-log-file.sh b/remove-fatal-errors-in-log-file.sh index 5f7b67e..45e2f6e 100755 --- a/remove-fatal-errors-in-log-file.sh +++ b/remove-fatal-errors-in-log-file.sh @@ -320,6 +320,15 @@ if [[ -n "$_err_msg" ]] ; then echo -e "$_err_msg" echo "" + echononl "Stop postfix mailservice .." + systemctl stop postfix > ${log_file} 2>&1 + if [[ $? -gt 0 ]] ; then + echo_failed + error "$(cat ${log_file})" + else + echo_ok + fi + if $terminal; then echononl "Try to delete lines conatining \033[1mfatal:\033[m in LOG-file \033[1m${MAIL_LOG}\033[m .." else @@ -335,6 +344,14 @@ if [[ -n "$_err_msg" ]] ; then echo_ok fi + echononl "Start postfix mailservice .." + systemctl start postfix > ${log_file} 2>&1 + if [[ $? -gt 0 ]] ; then + echo_failed + error "$(cat ${log_file})" + else + echo_ok + fi else