Update mumble certs during upgrades
This commit is contained in:
parent
0ddebf4dc3
commit
541639cc9e
|
@ -84,6 +84,21 @@ function upgrade_mumble {
|
|||
if [ -d /etc/letsencrypt ]; then
|
||||
usermod -a -G ssl-cert mumble-server
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/letsencrypt/live/${DEFAULT_DOMAIN_NAME}/fullchain.pem ]; then
|
||||
if ! grep -q "mumble.pem" /etc/mumble-server.ini; then
|
||||
sed -i 's|sslCert=.*|sslCert=/var/lib/mumble-server/mumble.pem|g' /etc/mumble-server.ini
|
||||
sed -i 's|sslKey=.*|sslKey=/var/lib/mumble-server/mumble.key|g' /etc/mumble-server.ini
|
||||
systemctl restart mumble
|
||||
fi
|
||||
else
|
||||
if ! grep -q "${DEFAULT_DOMAIN_NAME}/fullchain.pem" /etc/mumble-server.ini; then
|
||||
usermod -a -G ssl-cert mumble-server
|
||||
sed -i "s|sslCert=.*|sslCert=/etc/letsencrypt/live/${DEFAULT_DOMAIN_NAME}/fullchain.pem|g" /etc/mumble-server.ini
|
||||
sed -i "s|sslKey=.*|sslKey=/etc/letsencrypt/live/${DEFAULT_DOMAIN_NAME}/privkey.pem|g" /etc/mumble-server.ini
|
||||
systemctl restart mumble
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function backup_local_mumble {
|
||||
|
|
Loading…
Reference in New Issue