2022-04-24 11:44:20 +02:00
|
|
|
INFRA(7) "Infrastructure Baguette" "Manuel de l'infra de Baguette"
|
|
|
|
|
|
|
|
# Liste des machines à toucher lors d'une mise à jour des certificats
|
|
|
|
|
|
|
|
|
|
|
|
[- *Machine*
|
|
|
|
:- _Système_
|
|
|
|
:- _Applications nécessitant des certificats
|
|
|
|
|- team
|
|
|
|
:- OpenBSD
|
|
|
|
:- smptd
|
|
|
|
|- alpha
|
|
|
|
:- Alpine
|
|
|
|
:- nginx
|
|
|
|
|
|
|
|
_La machine *team* gère les certificats avec _acme-client_.
|
|
|
|
|
|
|
|
# Certificats gérés
|
|
|
|
|
|
|
|
- _\*.baguette.netlib.re_
|
|
|
|
|
|
|
|
# Comment mettre à jour
|
|
|
|
|
2022-12-17 04:53:02 +01:00
|
|
|
Script *maj-certificats.sh*
|
|
|
|
|
|
|
|
## Ce que le script fait
|
|
|
|
|
2022-04-24 11:44:20 +02:00
|
|
|
Si les machines _team_ et _alpha_ sont dans le *.ssh/config*, un copier/coller fonctionne.
|
|
|
|
|
|
|
|
```
|
|
|
|
ssh team acme-client baguette.netlib.re
|
|
|
|
NOW=`date "+%Y-%m-%d_%H-%M-%S"`
|
|
|
|
ssh team tar czvf crypto-$NOW.tar.gz /etc/ssl/bag* /etc/ssl/private/b*
|
|
|
|
scp team:crypto-$NOW.tar.gz .
|
|
|
|
scp crypto-$NOW.tar.gz alpha:/
|
|
|
|
ssh alpha "cd / && tar xf crypto-$NOW.tar.gz"
|
|
|
|
ssh alpha "rm /crypto-$NOW.tar.gz"
|
|
|
|
ssh alpha "pkill -1 nginx" # TODO: réparer le lancement de nginx
|
|
|
|
ssh team "rcctl restart smtpd"
|
|
|
|
ssh team "rcctl restart dovecot"
|
|
|
|
```
|