remove-fatal-errors-in-log-file.sh: stop ppostfix service befor deleting lines.
This commit is contained in:
parent
56f999b211
commit
033c95c9ce
@ -320,6 +320,15 @@ if [[ -n "$_err_msg" ]] ; then
|
|||||||
echo -e "$_err_msg"
|
echo -e "$_err_msg"
|
||||||
echo ""
|
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
|
if $terminal; then
|
||||||
echononl "Try to delete lines conatining \033[1mfatal:\033[m in LOG-file \033[1m${MAIL_LOG}\033[m .."
|
echononl "Try to delete lines conatining \033[1mfatal:\033[m in LOG-file \033[1m${MAIL_LOG}\033[m .."
|
||||||
else
|
else
|
||||||
@ -335,6 +344,14 @@ if [[ -n "$_err_msg" ]] ; then
|
|||||||
echo_ok
|
echo_ok
|
||||||
fi
|
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
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user