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 |
f720e47f
|
Tomáš Ballák
|
cd /root/.acme.sh/heatmap.zcu.cz/ \
|
9 |
a60193de
|
ballakt
|
openssl dhparam -dsaparam -out dhparams.pem 4096; \
|
10 |
f720e47f
|
Tomáš Ballák
|
bash /root/.acme.sh/acme.sh --issue -w /var/www/symfony/public -d heatmap.zcu.cz -k 4096 --debug 2; \
|
11 |
a60193de
|
ballakt
|
bash /root/.acme.sh/acme.sh --installcert -d heatmap.zcu.cz \
|
12 |
|
|
--key-file /root/.acme.sh/heatmap.zcu.cz/heatmap.zcu.cz.key \
|
13 |
|
|
--fullchain-file /root/.acme.sh/heatmap.zcu.cz/fullchain.cer \
|
14 |
|
|
--reloadcmd 'bash /etc/init.d/nginx reload';
|
15 |
|
|
";
|
16 |
|
|
else
|
17 |
|
|
docker-compose exec nginx /bin/sh -c "acme.sh --renew -d heatmap.zcu.cz";
|
18 |
|
|
fi
|