소스 검색

If a collision happens between cert upgrade and general upgrade then create the failure file so that retries will happen

Bob Mottram 6 년 전
부모
커밋
99fc662547
1개의 변경된 파일21개의 추가작업 그리고 0개의 파일을 삭제
  1. 21
    0
      src/freedombone-utils-web

+ 21
- 0
src/freedombone-utils-web 파일 보기

@@ -316,6 +316,13 @@ 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 /tmp/.upgrading ]; then';
320
+      echo '    if [ ! -f ~/letsencrypt_failed ]; then';
321
+      echo '        touch ~/letsencrypt_failed';
322
+      echo '    fi';
323
+      echo '    exit 0';
324
+      echo 'fi';
325
+      echo '';
319 326
       echo "PROJECT_NAME='${PROJECT_NAME}'";
320 327
       echo "COMPLETION_FILE=\$HOME/\${PROJECT_NAME}-completed.txt";
321 328
       echo '';
@@ -329,6 +336,14 @@ function letsencrypt_renewals {
329 336
       echo "}')";
330 337
       echo "    ADMIN_EMAIL_ADDRESS=\$ADMIN_USERNAME@\$HOSTNAME";
331 338
       echo '    for d in /etc/letsencrypt/live/*/ ; do';
339
+      echo '';
340
+      echo '        if [ -f /tmp/.upgrading ]; then';
341
+      echo '            if [ ! -f ~/letsencrypt_failed ]; then';
342
+      echo '                touch ~/letsencrypt_failed';
343
+      echo '            fi';
344
+      echo '            exit 0';
345
+      echo '        fi';
346
+      echo '';
332 347
       echo -n "        LETSENCRYPT_DOMAIN=\$(echo \"\$d\" | ";
333 348
       echo -n "awk -F '/' '{print ";
334 349
       echo -n "\$5";
@@ -366,6 +381,9 @@ function letsencrypt_renewals {
366 381
     { echo '#!/bin/bash';
367 382
       echo '';
368 383
       echo 'if [ -f /tmp/.upgrading ]; then';
384
+      echo '    if [ ! -f ~/letsencrypt_failed ]; then';
385
+      echo '        touch ~/letsencrypt_failed';
386
+      echo '    fi';
369 387
       echo '    exit 0';
370 388
       echo 'fi';
371 389
       echo '';
@@ -383,6 +401,9 @@ function letsencrypt_renewals {
383 401
       echo '        for d in /etc/letsencrypt/live/*/ ; do';
384 402
       echo '';
385 403
       echo '            if [ -f /tmp/.upgrading ]; then';
404
+      echo '                if [ ! -f ~/letsencrypt_failed ]; then';
405
+      echo '                    touch ~/letsencrypt_failed';
406
+      echo '                fi';
386 407
       echo '                exit 0';
387 408
       echo '            fi';
388 409
       echo '';