diff options
author | Daniel Hansson <daniel@techandme.se> | 2017-04-10 01:05:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-10 01:05:17 +0300 |
commit | 3fc8277b30931e08ce454859a53e22ba5d10fb68 (patch) | |
tree | 4b9f3b4e9a476e8f44404fffd18a44e7812e1d2d /lets-encrypt | |
parent | 48b443d9d002ad9b7694dd0d3bd0e784225b16a6 (diff) |
Avoid error message grep: /tmp/le_test: No such file or directory
Diffstat (limited to 'lets-encrypt')
-rw-r--r-- | lets-encrypt/activate-ssl.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lets-encrypt/activate-ssl.sh b/lets-encrypt/activate-ssl.sh index 9ad44edb..2d5441a7 100644 --- a/lets-encrypt/activate-ssl.sh +++ b/lets-encrypt/activate-ssl.sh @@ -232,6 +232,8 @@ sudo service apache2 stop eval "letsencrypt certonly --standalone $default_le" if [ "$?" -eq 0 ]; then echo "success" > /tmp/le_test +else + echo "fail" > /tmp/le_test fi # Activate Apache again (Disabled during standalone) service apache2 start @@ -242,12 +244,16 @@ webroot() { eval "letsencrypt certonly --webroot --webroot-path $NCPATH $default_le" if [ "$?" -eq 0 ]; then echo "success" > /tmp/le_test +else + echo "fail" > /tmp/le_test fi } certonly() { eval "letsencrypt certonly $default_le" if [ "$?" -eq 0 ]; then echo "success" > /tmp/le_test +else + echo "fail" > /tmp/le_test fi } @@ -289,7 +295,7 @@ fi # Generate the cert for f in "${methods[@]}"; do "$f" -if [ "$(grep 'success' /tmp/le_test)" == 'success' ]; then +if [ "$(grep -q 'success' /tmp/le_test)" == 'success' ]; then rm -f /tmp/le_test create_config "$f" else |