1
0
Fork 0

Hook script to update services when certbot updates

This commit is contained in:
Luca Beltrame 2020-07-20 00:04:59 +02:00
parent 20bbee7a56
commit bb2165d424
Signed by: einar
GPG key ID: 4707F46E9EC72DEC

14
reload_services.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
systemctl reload nginx
cp /etc/letsencrypt/live/heavensinferno.net/fullchain.pem /home/mailcow/mailcow-dockerized/data/assets/ssl/cert.pem
cp /etc/letsencrypt/live/heavensinferno.net/privkey.pem /home/mailcow/mailcow-dockerized/data/assets/ssl/key.pem
postfix_c=$(docker ps -qaf name=postfix-mailcow)
dovecot_c=$(docker ps -qaf name=dovecot-mailcow)
nginx_c=$(docker ps -qaf name=nginx-mailcow)
docker restart ${postfix_c} ${dovecot_c} ${nginx_c}
if [ $(systemctl is-active mumble-server) ];
then
systemctl restart mumble-server
fi