Improvements to setup scripts
This commit is contained in:
+3
-5
@@ -1,16 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
CRON_FILE=/etc/cron.d/renew_ssl_certificates
|
CRON_FILE=/etc/cron.daily/renew-ssl-certs
|
||||||
|
|
||||||
if [ -f "$CRON_FILE" ]; then
|
if [ -f "$CRON_FILE" ]; then
|
||||||
echo "$CRON_FILE already exists, aborting."
|
echo "$CRON_FILE already exists, aborting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "SHELL=/bin/sh" >> $CRON_FILE
|
echo "#!/bin/bash" >> $CRON_FILE
|
||||||
echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> $CRON_FILE
|
echo "$(pwd)/renew-certificates.sh" >> $CRON_FILE
|
||||||
echo "" >> $CRON_FILE
|
|
||||||
echo "0 2 * * * $(pwd)/renew-certificates.sh" >> $CRON_FILE
|
|
||||||
|
|
||||||
systemctl restart cron
|
systemctl restart cron
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ fi
|
|||||||
|
|
||||||
certbot_path="./data/certbot"
|
certbot_path="./data/certbot"
|
||||||
rsa_key_size=4096
|
rsa_key_size=4096
|
||||||
domains=(dittmar.dev git.dittmar.dev docker.dittmar.dev cantropee.dittmar.dev)
|
domains=(dittmar.dev git.dittmar.dev vault.dittmar.dev cantropee.dittmar.dev)
|
||||||
email="robindittmar@gmail.com" # Adding a valid address is strongly recommended
|
email="robindittmar@gmail.com" # Adding a valid address is strongly recommended
|
||||||
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits
|
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits
|
||||||
|
|
||||||
|
|||||||
@@ -12,5 +12,3 @@ docker run \
|
|||||||
|
|
||||||
docker restart nginx
|
docker restart nginx
|
||||||
|
|
||||||
echo "updated $(date)" >> updated.txt
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user