pvestatd: cleanup, run PVE::RPCEnvironment->init()
This commit is contained in:
parent
b89ae9fc92
commit
d36acebb14
30
bin/pvestatd
30
bin/pvestatd
@ -3,28 +3,16 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use PVE::INotify;
|
||||
use PVE::RPCEnvironment;
|
||||
use PVE::Service::pvestatd;
|
||||
|
||||
PVE::Service::pvestatd->run_cli();
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
pvestatd - PVE Status Daemon
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=include synopsis
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This daemom queries the status of VMs, storages and containers at
|
||||
regular intervals. The result is sent to all nodes in the cluster.
|
||||
|
||||
=include pve_copyright
|
||||
|
||||
|
||||
|
||||
my $prepare = sub {
|
||||
my $rpcenv = PVE::RPCEnvironment->init('cli');
|
||||
|
||||
$rpcenv->init_request();
|
||||
$rpcenv->set_language($ENV{LANG});
|
||||
$rpcenv->set_user('root@pam');
|
||||
};
|
||||
|
||||
PVE::Service::pvestatd->run_cli(undef, undef, $prepare);
|
||||
|
Loading…
x
Reference in New Issue
Block a user