updated readme

This commit is contained in:
Alexander Gabriel 2025-01-15 21:53:55 +01:00
parent 29f754bbcc
commit d32caa3762
3 changed files with 56 additions and 33 deletions

View File

@ -1 +1,28 @@
Collection of Scripts an Tools to handle small "problems" of ISPConfig Collection of Scripts an Tools to handle small "problems" of ISPConfig
# Update Cert-Files and restart Services after Let's Encrypt-Certificates where updated
Stolen here: https://www.howtoforge.com/securing-your-ispconfig-3-managed-mailserver-with-a-valid-lets-encrypt-certificate/
Files are in this repository but renamed to be more neutral and not "mailserver"-stuff
Checks for configs of:
* Postfix
* Dovecot
* pure-ftpd
* influx
* coturn
Updates Cert-Files and restarts.
Update Domain-Name in files and copy them to:
```
/usr/local/bin/le_services_restart.sh
/etc/systemd/system/le-services-restart.service
/etc/systemd/system/le-services-restart.path
```
Don't forget to:
```
chmod +x /usr/local/bin/le_services_restart.sh
```

View File

@ -8,23 +8,40 @@
# Short-Description: LE SERVICES CERT AUTO UPDATER # Short-Description: LE SERVICES CERT AUTO UPDATER
# Description: Restart services automatically when a new Let's Encrypt certificate is issued. # Description: Restart services automatically when a new Let's Encrypt certificate is issued.
### END INIT INFO ### END INIT INFO
systemctl restart postfix # postfix
FILE=/etc/postfix/main.cf
if [ -f "$FILE" ]; then
systemctl restart influxd
fi
# dovecot
FILE=/etc/dovecot/dovecot.conf
if [ -f "$FILE" ]; then
systemctl restart dovecot systemctl restart dovecot
fi
# pro-tftp # pro-tftp
FILE=/etc/pure-ftpd/pure-ftpd.conf
if [ -f "$FILE" ]; then
cat /root/.acme.sh/server.example.com/fullchain.pem > /etc/ssl/private/pure-ftpd.pem cat /root/.acme.sh/server.example.com/fullchain.pem > /etc/ssl/private/pure-ftpd.pem
cat /root/.acme.sh/server.example.com/server.example.com.key >> /etc/ssl/private/pure-ftpd.pem cat /root/.acme.sh/server.example.com/server.example.com.key >> /etc/ssl/private/pure-ftpd.pem
systemctl restart pure-ftpd-mysql.service systemctl restart pure-ftpd-mysql.service
fi
# influxdb # influxdb
FILE=/etc/influxdb/influxdb.pem FILE=/etc/influxdb/influxdb.pem
if [ -f "$FILE" ]; then if [ -f "$FILE" ]; then
cat /root/.acme.sh/server.example.com/fullchain.pem > /etc/influxdb/influxdb.pem && systemctl restart influxd cat /root/.acme.sh/server.example.com/fullchain.pem > /etc/influxdb/influxdb.pem
cat /etc/letsencrypt/live/server.example.com/server.example.com.key > /etc/influxdb/influxdb.key && systemctl restart influxd cat /etc/letsencrypt/live/server.example.com/server.example.com.key > /etc/influxdb/influxdb.key
systemctl restart influxd
fi fi
# coturn
FILE=/usr/local/etc/turn_server_cert.pem
if [ -f "$FILE" ]; then
cat /root/.acme.sh/server.example.com/fullchain.pem > /usr/local/etc/turn_server_cert.pem
cat /etc/letsencrypt/live/server.example.com/server.example.com.key > /usr/local/etc/turn_server_pkey.pem
chown turnserver /usr/local/etc/turn_server*
systemctl restart coturn
fi

View File

@ -1,21 +0,0 @@
# LetsEncrypt
from: https://www.howtoforge.com/securing-your-ispconfig-3-managed-mailserver-with-a-valid-lets-encrypt-certificate/
``` sh
nano /usr/local/bin/le_services_restart.sh
```
``` sh
chmod +x /usr/local/bin/le_services_restart.sh
```
``` sh
nano /etc/systemd/system/le-services-restart.service
```
```sh
nano /etc/systemd/system/le-services-restart.path
```