Restart postfix service via systemd
The mta-sts service already uses Restart=on-failure
This commit is contained in:
parent
53f2925435
commit
ec695da167
6 changed files with 17 additions and 37 deletions
|
@ -1,9 +0,0 @@
|
|||
# Managed by Ansible
|
||||
|
||||
check process mta-sts-daemon
|
||||
matching "/usr/bin/python3 /usr/bin/mta-sts-daemon"
|
||||
group mailserver
|
||||
start program = "/usr/sbin/service postfix-mta-sts-resolver start"
|
||||
stop program = "/usr/sbin/service postfix-mta-sts-resolver stop"
|
||||
if 2 restarts within 3 cycles then timeout
|
||||
if failed host 127.0.0.1 port 8461 for 3 cycles then restart
|
|
@ -1,7 +0,0 @@
|
|||
# Managed by Ansible
|
||||
|
||||
check process postfix with pidfile /var/spool/postfix/pid/master.pid
|
||||
group mailserver
|
||||
start program = "/usr/sbin/service postfix@- start"
|
||||
stop program = "/usr/sbin/service postfix@- stop"
|
||||
if failed port 25 protocol smtp with timeout 15 seconds for 3 cycles then restart
|
4
files/systemd/override.conf
Normal file
4
files/systemd/override.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Ansible managed
|
||||
|
||||
[Service]
|
||||
Restart=always
|
Loading…
Add table
Add a link
Reference in a new issue