Files
webmin/nftables/apply-boot.pl
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

26 lines
494 B
Perl
Executable File

#!/usr/bin/perl
# apply-boot.pl
# Apply Webmin-managed nftables rules from the saved configuration
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
our ($module_name, $no_acl_check);
$no_acl_check++;
if ($0 =~ /^(.*\/)[^\/]+$/) {
chdir($1);
}
require './nftables-lib.pl';
if ($module_name ne 'nftables') {
print STDERR "Command must be run with full path\n";
exit(5);
}
my $err = apply_restore();
if ($err) {
print STDERR $err, "\n";
exit(1);
}
exit(0);