renewal-hooks let’s encrypt

/etc/letsencrypt/renewal-hooks/post/001-restart-cockpit.sh

!/usr/bin/env bash

echo „SSL certificates renewed“

cp /etc/letsencrypt/live/au.hg-system.com/fullchain.pem /etc/cockpit/ws-certs.d/au.hg-system.com.crt
cp /etc/letsencrypt/live/au.hg-system.com/privkey.pem /etc/cockpit/ws-certs.d/au.hg-system.com.key
chown cockpit-ws:cockpit-ws /etc/cockpit/ws-certs.d/au.hg-system.com.crt /etc/cockpit/ws-certs.d/au.hg-system.com.key

echo „Restarting Cockpit“
systemctl restart cockpit