Projekt

Obecné

Profil

Stáhnout (1.08 KB) Statistiky
| Větev: | Revize:
1 a60193de ballakt
#!/bin/bash
2
# Usage
3
# if you want create new license run: renew_certificate new
4
# if you want re-create the existing license run: renew_certificate
5
6
if [ "$1" = "new" ]; then
7
    docker-compose exec nginx /bin/sh -c "
8 4cd05f77 Tomáš Ballák
    cd /root/.acme.sh; \
9 9716a3ee Tomáš Ballák
    bash acme.sh  --issue --nginx /etc/nginx/sites-available/default.conf -d heatmap.zcu.cz --debug 2; \
10
    bash acme.sh --installcert -d heatmap.zcu.cz\
11 4cd05f77 Tomáš Ballák
    --key-file /certificate/key.pem \
12
    --fullchain-file /certificate/cert.pem \
13 a60193de ballakt
    --reloadcmd 'bash /etc/init.d/nginx reload';
14
    ";
15 0c042d09 Tomáš Ballák
    elif [ "$1" = "new-www" ];then
16 9716a3ee Tomáš Ballák
    docker-compose exec nginx /bin/sh -c "
17
    cd /root/.acme.sh; \
18
    bash acme.sh  --issue --nginx /etc/nginx/sites-available/default.conf -d www.heatmap.zcu.cz --debug 2; \
19
    bash acme.sh --installcert -d www.heatmap.zcu.cz\
20
    --key-file /certificate/key-www.pem \
21
    --fullchain-file /certificate/cert-www.pem \
22
    --reloadcmd 'bash /etc/init.d/nginx reload';
23
    ";
24 a60193de ballakt
else
25 9716a3ee Tomáš Ballák
    docker-compose exec nginx /bin/sh -c "cd root/.acme.sh && bash acme.sh --renew -d heatmap.zcu.cz && bash acme.sh --renew -d www.heatmap.zcu.cz";
26 a60193de ballakt
fi