use strict;
use warnings;
use Daemon::Control;
use Path::Tiny;
my $basedir = path(__FILE__)->parent;
exit Daemon::Control->new(
init_config => '/data/perl5/etc/bashrc',
name => "HomePanel",
lsb_start => '$local_fs $network $named $time',
lsb_stop => '$local_fs $network $named $time',
lsb_sdesc => 'Home info panel',
lsb_desc => 'Show forecast, tube, bus status.',
path => __FILE__,
program => $basedir->child('driver-async.pl'),
program_args => [ $basedir->child('homepanel.conf') ],
user => 'dakkar',
group => 'dakkar',
directory => $basedir,
pid_file => $basedir->child('homepanel.pid'),
stderr_file => $basedir->child('homepanel.out'),
stdout_file => $basedir->child('homepanel.err'),
fork => 2,
)->run;