Files
webmin/nftables/bootup.cgi
2026-09-05 17:35:03 -05:00

22 lines
494 B
Perl
Executable File

#!/usr/bin/perl
# bootup.cgi
# Enable or disable the system nftables service 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'});
nftables_service_status() || error($text{'bootup_eservice'});
if ($in{'boot'}) {
enable_nftables_at_boot();
}
else {
disable_nftables_at_boot();
}
webmin_log($in{'boot'} ? "bootup" : "bootdown");
redirect("index.cgi");