浏览代码

Remove temporary renewal file if it exists

Bob Mottram 6 年前
父节点
当前提交
9a150445e6
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
    0
      src/freedombone-utils-web

+ 8
- 0
src/freedombone-utils-web 查看文件

@@ -316,6 +316,10 @@ function letsencrypt_renewals {
316 316
     # the main script tries to renew once per month
317 317
     { echo '#!/bin/bash';
318 318
       echo '';
319
+      echo 'if [ -f ~/temp_renewletsencrypt.txt ]; then';
320
+      echo '    rm ~/temp_renewletsencrypt.txt';
321
+      echo 'fi';
322
+      echo '';
319 323
       echo 'if [ -f /tmp/.upgrading ]; then';
320 324
       echo '    if [ ! -f ~/letsencrypt_failed ]; then';
321 325
       echo '        touch ~/letsencrypt_failed';
@@ -380,6 +384,10 @@ function letsencrypt_renewals {
380 384
     # a secondary script keeps trying to renew after a failure
381 385
     { echo '#!/bin/bash';
382 386
       echo '';
387
+      echo 'if [ -f ~/temp_renewletsencrypt.txt ]; then';
388
+      echo '    rm ~/temp_renewletsencrypt.txt';
389
+      echo 'fi';
390
+      echo '';
383 391
       echo 'if [ -f /tmp/.upgrading ]; then';
384 392
       echo '    if [ ! -f ~/letsencrypt_failed ]; then';
385 393
       echo '        touch ~/letsencrypt_failed';