We cannot call letsencrypt.sh from a hook script, as there's a lock filetags/smeserver-letsencrypt-client-0.2.4-1
parent
0540516807
commit
bae49f049e
4 changed files with 11 additions and 20 deletions
@ -0,0 +1 @@ |
||||
PERMS=0755 |
@ -0,0 +1,10 @@ |
||||
{ |
||||
|
||||
if (($letsencrypt{'status'} || 'disabled') eq 'enabled'){ |
||||
$OUT .= "/usr/bin/letsencrypt.sh -c 2>&1 | 2>&1 | awk '{ print strftime(), $0; fflush(); }' >> /var/log/letsencrypt.sh.log\n"; |
||||
if (($letsencrypt{'RevokeOldCertificates'} || 'disabled') =~ m/^enabled|on|yes|1$/){ |
||||
$OUT .= "/usr/bin/le_revoke.sh 2>&1 | 2>&1 | awk '{ print strftime(), $0; fflush(); }' >> /var/log/letsencrypt.sh.log\n"; |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,13 +0,0 @@ |
||||
{ |
||||
|
||||
my $le = $letsencrypt{'status'} || 'disabled'; |
||||
|
||||
if ($le eq 'enabled'){ |
||||
$OUT .= '# Letsencrypt renewal' . "\n"; |
||||
$OUT .= '2 4 * * * root sleep $[ $RANDOM \% 3600 ]; /usr/bin/letsencrypt.sh -c >> /var/log/letsencrypt.sh.log 2>&1' . "\n"; |
||||
} |
||||
else{ |
||||
$OUT .= '# Letsencrypt is disabled' . "\n"; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue