added tool to restart mailservers after cert changed
This commit is contained in:
parent
95f37fe9f2
commit
725be731aa
@ -0,0 +1 @@
|
||||
Collection of Scripts an Tools to handle small "problems" of ISPConfig
|
9
le-mailserver-restart.path
Normal file
9
le-mailserver-restart.path
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description="Monitor the mailserver certificate files to trigger a e-mail services restart after the certificates has been renewed"
|
||||
|
||||
[Path]
|
||||
PathModified=/root/.acme.sh/mail.example.com/
|
||||
Unit=le-mailserver-restart.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
5
le-mailserver-restart.service
Normal file
5
le-mailserver-restart.service
Normal file
@ -0,0 +1,5 @@
|
||||
[Unit]
|
||||
Description="Run script to restart Postfix and Dovecot after the certificate has been renewed"
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/le_mailserver_restart.sh
|
12
le_mailserver_restart.sh
Normal file
12
le_mailserver_restart.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: LE MAILSERVER CERT AUTO UPDATER
|
||||
# Required-Start: $local_fs $network
|
||||
# Required-Stop: $local_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: LE MAILSERVER CERT AUTO UPDATER
|
||||
# Description: Restart mail server automatically when a new Let's Encrypt certificate is issued.
|
||||
### END INIT INFO
|
||||
systemctl restart postfix
|
||||
systemctl restart dovecot
|
21
restart_services_on_cert_update.md
Normal file
21
restart_services_on_cert_update.md
Normal file
@ -0,0 +1,21 @@
|
||||
# LetsEncrypt
|
||||
|
||||
from: https://www.howtoforge.com/securing-your-ispconfig-3-managed-mailserver-with-a-valid-lets-encrypt-certificate/
|
||||
|
||||
|
||||
``` sh
|
||||
nano /usr/local/bin/le_mailserver_restart.sh
|
||||
```
|
||||
|
||||
``` sh
|
||||
chmod +x /usr/local/bin/le_mailserver_restart.sh
|
||||
```
|
||||
|
||||
|
||||
``` sh
|
||||
nano /etc/systemd/system/le-mailserver-restart.service
|
||||
```
|
||||
|
||||
```sh
|
||||
nano /etc/systemd/system/le-mailserver-restart.path
|
||||
```
|
Loading…
Reference in New Issue
Block a user