Improvements to setup scripts
This commit is contained in:
+3
-5
@@ -1,16 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
CRON_FILE=/etc/cron.d/renew_ssl_certificates
|
||||
CRON_FILE=/etc/cron.daily/renew-ssl-certs
|
||||
|
||||
if [ -f "$CRON_FILE" ]; then
|
||||
echo "$CRON_FILE already exists, aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "SHELL=/bin/sh" >> $CRON_FILE
|
||||
echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> $CRON_FILE
|
||||
echo "" >> $CRON_FILE
|
||||
echo "0 2 * * * $(pwd)/renew-certificates.sh" >> $CRON_FILE
|
||||
echo "#!/bin/bash" >> $CRON_FILE
|
||||
echo "$(pwd)/renew-certificates.sh" >> $CRON_FILE
|
||||
|
||||
systemctl restart cron
|
||||
|
||||
|
||||
Reference in New Issue
Block a user