remove-fatal-errors-in-log-file.sh: stop ppostfix service befor deleting lines.
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user