Files
webmin/nftables/bootup.cgi
Ilia Ross 44ff20e5c6
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Fix to perltidy new nftables module to convert spaces to tabs
2026-05-03 22:36:31 +02:00

21 lines
428 B
Perl
Executable File

#!/usr/bin/perl
# bootup.cgi
# Enable or disable Webmin-managed nftables rules at boot time
require './nftables-lib.pl'; ## no critic
use strict;
use warnings;
our (%in, %text);
ReadParse();
assert_acl('bootup');
foreign_check("init") || error($text{'bootup_einit'});
if ($in{'boot'}) {
create_nftables_init();
}
else {
disable_nftables_init();
}
webmin_log($in{'boot'} ? "bootup" : "bootdown");
redirect("index.cgi");