]> git.proxmox.com Git - pve-firewall.git/blame - src/pve-firewall
pvefw-logger: fix typo
[pve-firewall.git] / src / pve-firewall
CommitLineData
e2beb7aa
DM
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5use PVE::SafeSyslog;
0c32b7fb 6use PVE::Service::pve_firewall;
e2beb7aa 7
cf10b505
DM
8$SIG{'__WARN__'} = sub {
9 my $err = $@;
10 my $t = $_[0];
11 chomp $t;
12 print STDERR "$t\n";
13 syslog('warning', "%s", $t);
14 $@ = $err;
15};
16
0c32b7fb
DM
17my $prepare = sub {
18 my $rpcenv = PVE::RPCEnvironment->init('cli');
e2beb7aa 19
0c32b7fb
DM
20 $rpcenv->init_request();
21 $rpcenv->set_language($ENV{LANG});
22 $rpcenv->set_user('root@pam');
23};
e2beb7aa 24
0c32b7fb 25PVE::Service::pve_firewall->run_cli(undef, undef, $prepare);