Jean-Philippe Pialasse e631a1dffc * Wed Feb 12 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0-2.sme
- move smanager panel in package [SME: 12916]
- add Requires
- add templates from smeserver-letsencrypt
- use /var/www/html/.well-known/acme-challenge
2025-02-13 01:05:14 -05:00

21 lines
486 B
Plaintext

{
use strict;
use warnings;
use esmith::ConfigDB;
my $configDB = esmith::ConfigDB->open_ro or die("can't open Config DB");
my $letsencryptStatus = $configDB->get_prop( 'letsencrypt', 'status' ) || 'disabled';
if ( $letsencryptStatus eq 'enabled' ) {
$OUT .= "#!/bin/sh\n\n";
$OUT .= "32 3 * * 5 root test -s /etc/dehydrated/domains.txt && /usr/bin/dehydrated --cron";
}
else {
$OUT .= "# letsencrypt is disabled\n";
}
}