add daemon daemonizer
This commit is contained in:
15
Netdisco/bin/netdisco-daemon
Executable file
15
Netdisco/bin/netdisco-daemon
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Daemon::Control;
|
||||
|
||||
my $program = "$ENV{HOME}/bin/netdisco-daemon-fg";
|
||||
|
||||
Daemon::Control->new({
|
||||
name => 'Netdisco Daemon',
|
||||
user => 'netdisco',
|
||||
program => ($ENV{NETDISCO_DAEMON} || $program),
|
||||
pid_file => "$ENV{HOME}/netdisco-daemon.pid",
|
||||
})->run;
|
||||
Reference in New Issue
Block a user