Init repo

This commit is contained in:
2023-01-11 01:03:34 +01:00
parent 533a540a1d
commit 85930b7cac
33 changed files with 2389 additions and 0 deletions

28
utils/renew_https_certificate Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/sh
if [ -z $1 ];
then
exit 1;
fi
acme-client $1
case $? in
0)
if [ "$2" == "xmpp" ];
then
echo on passe la;
install -o _prosody -g _prosody /etc/ssl/private/"$1".key /etc/prosody/certs/"$1".key;
install -o _prosody -g _prosody /etc/ssl/"$1".crt /etc/prosody/certs/"$1".crt;
fi
rcctl reload nginx prosody dovecot;
rcctl restart smtpd;
;;
1)
echo "acme-client a rencontré un problème dans le renouvellement des certificat https pour le domaine $1 " | mail -s "`hostname` Problème de certificat HTTPS " root;
;;
*)
exit 0;
;;
esac