mirror of
https://github.com/webmin/webmin.git
synced 2026-05-06 15:20:29 +01:00
26 lines
494 B
Perl
Executable File
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);
|