Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <daniel@techandme.se>2017-03-16 21:24:50 +0300
committerGitHub <noreply@github.com>2017-03-16 21:24:50 +0300
commita37b7cbedb5a023bfda59c1b795068aef09510d8 (patch)
tree8a919e985a05940a3cb16305a946b87191d95db1 /lets-encrypt
parent22505a9515897ec0f93426ad0411c16d00c3af2f (diff)
if it exits there is a risk that apache won't boot
Diffstat (limited to 'lets-encrypt')
-rw-r--r--lets-encrypt/test-new-config.sh15
1 files changed, 4 insertions, 11 deletions
diff --git a/lets-encrypt/test-new-config.sh b/lets-encrypt/test-new-config.sh
index 59d4f8a0..e37a3445 100644
--- a/lets-encrypt/test-new-config.sh
+++ b/lets-encrypt/test-new-config.sh
@@ -62,22 +62,15 @@ else
fi
DATE='$(date +%Y-%m-%d_%H:%M)'
-IF='if [[ $? -eq 0 ]]'
cat << CRONTAB > "$SCRIPTS/letsencryptrenew.sh"
#!/bin/sh
service apache2 stop
if ! letsencrypt renew > /var/log/letsencrypt/renew.log 2>&1 ; then
- echo Automated renewal failed:
- cat /var/log/letsencrypt/renew.log
- exit 1
-fi
-service apache2 start
-$IF
-then
- echo "Let's Encrypt SUCCESS!"--$DATE >> /var/log/letsencrypt/cronjob.log
+ echo "Let's Encrypt FAILED!"--$(date +%Y-%m-%d_%H:%M) >> /var/log/letsencrypt/cronjob.log
+ service apache2 start
else
- echo "Let's Encrypt FAILED!"--$DATE >> /var/log/letsencrypt/cronjob.log
- reboot
+ echo "Let's Encrypt SUCCESS!"--$(date +%Y-%m-%d_%H:%M) >> /var/log/letsencrypt/cronjob.log
+ service apache2 start
fi
CRONTAB