You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: renewAndSendToProxy.sh
+79-76Lines changed: 79 additions & 76 deletions
Original file line number
Diff line number
Diff line change
@@ -17,40 +17,42 @@ TIMEOUT=5
17
17
printf"${GREEN}Hello! renewAndSendToProxy runs. Today is $(date)${NC}\n"
18
18
19
19
# send current certificates to proxy - after that do a certbot renew round (which could take some seconds) and send updated certificates to proxy (faster startup with https when old certificates are still valid)
20
-
fordin /etc/letsencrypt/live/*/ ;do
21
-
#move to directory
22
-
cd$d
23
-
24
-
#get directory name (which is the name of the regular domain)
25
-
folder=${PWD##*/}
26
-
27
-
#concat certificates
28
-
printf"old certificates for $folder will be send to proxy\n"
printf"${RED}transmit failed after ${TRIES} attempts.${NC}\n"
97
+
else
98
+
printf"${RED}transmit failed, we try again in ${TIMEOUT} seconds.${NC}\n"
99
+
sleep $TIMEOUT
100
+
fi
101
+
done
102
+
103
+
if [ $exitcode-eq 0 ];then
104
+
printf"proxy received $folder.combined.pem\n"
105
+
fi
106
+
107
+
done
105
108
done
106
109
107
110
printf"${RED}/etc/letsencrypt will be backed up as backup-date-time.tar.gz. It's important to know that some files are symbolic links (inside this backup) and they need to be untared correctly.${NC}\n"
0 commit comments