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 |
43cc50af
|
Tomáš Ballák
|
bash acme.sh --issue -d heatmap.zcu.cz --nginx /etc/nginx/sites-available/default.conf --debug 2; \
|
10 |
4cd05f77
|
Tomáš Ballák
|
bash acme.sh --installcert -d heatmap.zcu.cz \
|
11 |
|
|
--key-file /certificate/key.pem \
|
12 |
|
|
--fullchain-file /certificate/cert.pem \
|
13 |
a60193de
|
ballakt
|
--reloadcmd 'bash /etc/init.d/nginx reload';
|
14 |
|
|
";
|
15 |
|
|
else
|
16 |
43cc50af
|
Tomáš Ballák
|
docker-compose exec nginx /bin/sh -c "cd root/.acme.sh && bash acme.sh --renew -d heatmap.zcu.cz";
|
17 |
a60193de
|
ballakt
|
fi
|