Browse Source

update script to make script. add wrapper for krash.

master
Charles Reid 6 years ago
parent
commit
3984a362e1
  1. 24
      krash_make_cert.sh
  2. 55
      make_cert.sh

24
krash_make_cert.sh

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
#!/bin/bash
#
# renew/run certbot on krash
set +x
# disable system service that will re-spawn docker pod
echo "Disable system service:"
sudo systemctl disable dockerpod-charlesreid1
sudo systemctl stop dockerpod-charlesreid1
echo "Stop pod:"
docker-compose -f $HOME/codes/docker/pod-charlesreid1/docker-compose.yml down
echo "Run certbot create:"
sudo ./make_cert.sh
echo "Start pod:"
docker-compose -f $HOME/codes/docker/pod-charlesreid1/docker-compose.yml up -d
echo "Enable system service:"
sudo systemctl enable dockerpod-charlesreid1
set -x

55
make_cert.sh

@ -11,20 +11,65 @@ fi @@ -11,20 +11,65 @@ fi
set -x
DOMS="charlesreid1.red charlesreid1.blue charlesreid1.com"
#SUBS="www git pages files"
#SUBS="hooks bots"
SUBS="api"
##############
# Domains
##############
#DOMS="charlesreid1.red charlesreid1.blue charlesreid1.com"
#
#for DOM in $DOMS; do
#
# ## Fake:
# #echo certbot certonly \
# # --standalone \
# # --non-interactive \
# # --agree-tos \
# # --email charles@charlesreid1.com \
# # -d ${SUB}.${DOM}
#
# # Real:
# certbot certonly \
# --standalone \
# --non-interactive \
# --agree-tos \
# --email charles@charlesreid1.com \
# -d ${DOM}
#
#done
##############
# Subdomains
##############
DOMS="charlesreid1.com"
SUBS="files git pages www"
# Subdomains
for SUB in $SUBS; do
for DOM in $DOMS; do
echo certbot certonly \
## Fake:
#echo certbot certonly \
# --standalone \
# --non-interactive \
# --agree-tos \
# --email charles@charlesreid1.com \
# -d ${SUB}.${DOM}
# Real:
certbot certonly \
--standalone \
--non-interactive \
--agree-tos \
--email charles@charlesreid1.com \
-d ${SUB}.${DOM}
done
done
set +x

Loading…
Cancel
Save