]> git.proxmox.com Git - pve-manager.git/blame - bin/pvedaemon
pveversion: fix removed packages with residual configs
[pve-manager.git] / bin / pvedaemon
CommitLineData
776de3bc 1#!/usr/bin/perl -T
aff192e6
DM
2
3$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
4
5delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
6
7use strict;
776de3bc 8use warnings;
6669b51c 9
36870208 10use PVE::SafeSyslog;
ab4ae3dc 11use PVE::Service::pvedaemon;
aff192e6
DM
12
13$SIG{'__WARN__'} = sub {
14 my $err = $@;
15 my $t = $_[0];
16 chomp $t;
6669b51c
DM
17 print STDERR "$t\n";
18 syslog('warning', "%s", $t);
aff192e6
DM
19 $@ = $err;
20};
21
ab4ae3dc 22my $prepare = sub {
98ac92f0
WB
23 # create dir for dtach sockets
24 mkdir "/var/run/dtach";
6669b51c 25};
aff192e6 26
092fa1b0 27PVE::Service::pvedaemon->run_cli_handler(prepare => $prepare);