Skip to content

Commit b3d9dd9

Browse files
Remove unused modification time check
In the previous commit we removed the code which used to call this function, so this is unnecessary to keep.
1 parent 11369a0 commit b3d9dd9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/scripts/util.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff 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-
}

0 commit comments

Comments
 (0)