File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -161,19 +161,3 @@ get_certificate() {
161161 $3 \
162162 --debug
163163}
164-
165- # Given a domain name, return true if a renewal is required (last renewal
166- # ran over a week ago or never happened yet), otherwise return false.
167- is_renewal_required () {
168- # If the file does not exist assume a renewal is required
169- last_renewal_file=" /etc/letsencrypt/live/$1 /privkey.pem"
170- [ ! -e " $last_renewal_file " ] && return ;
171-
172- # If the file exists, check if the last renewal was more than a week ago
173- one_week_sec=604800
174- now_sec=$( date -d now +%s)
175- last_renewal_sec=$( stat -c %Y " $last_renewal_file " )
176- last_renewal_delta_sec=$(( ($now_sec - $last_renewal_sec ) ))
177- is_finshed_week_sec=$(( ($one_week_sec - $last_renewal_delta_sec ) ))
178- [ $is_finshed_week_sec -lt 0 ]
179- }
You can’t perform that action at this time.
0 commit comments