pve-manager/bin/pvedaemon
2015-10-02 11:28:01 +02:00

28 lines
495 B
Perl
Executable File

#!/usr/bin/perl -T
$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
use strict;
use warnings;
use PVE::SafeSyslog;
use PVE::Service::pvedaemon;
$SIG{'__WARN__'} = sub {
my $err = $@;
my $t = $_[0];
chomp $t;
print STDERR "$t\n";
syslog('warning', "%s", $t);
$@ = $err;
};
my $prepare = sub {
# create dir for dtach sockets
mkdir "/var/run/dtach";
};
PVE::Service::pvedaemon->run_cli_handler(prepare => $prepare);