Improvements to setup scripts

This commit is contained in:
2024-06-20 00:09:44 +02:00
parent 455e154792
commit 35b6616e74
3 changed files with 4 additions and 8 deletions
+3 -5
View File
@@ -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
+1 -1
View File
@@ -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
-2
View File
@@ -12,5 +12,3 @@ docker run \
docker restart nginx docker restart nginx
echo "updated $(date)" >> updated.txt