]> git.proxmox.com Git - pve-ha-manager.git/blob - src/pve-ha-crm
allow to configure watchdog module in /etc/default/pve-ha-manager
[pve-ha-manager.git] / src / pve-ha-crm
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use PVE::Service::pve_ha_crm;
7
8 use PVE::RPCEnvironment;
9 use PVE::SafeSyslog;
10
11 $SIG{'__WARN__'} = sub {
12 my $err = $@;
13 my $t = $_[0];
14 chomp $t;
15 print STDERR "$t\n";
16 syslog('warning', "%s", $t);
17 $@ = $err;
18 };
19
20 my $prepare = sub {
21 my $rpcenv = PVE::RPCEnvironment->init('cli');
22
23 $rpcenv->init_request();
24 $rpcenv->set_language($ENV{LANG});
25 $rpcenv->set_user('root@pam');
26
27 };
28
29 PVE::Service::pve_ha_crm->run_cli(undef, undef, $prepare);