mirror of
https://github.com/webmin/webmin.git
synced 2026-09-12 00:20:39 +01:00
22 lines
494 B
Perl
Executable File
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");
|