summaryrefslogtreecommitdiff
path: root/homepanel-control
blob: 5bc877a20e72ebe7cf5803bfd943c0b2e1365fd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env perl 
use strict;
use warnings;
use Daemon::Control;
use Path::Tiny;
 
my $basedir = path(__FILE__)->parent->realpath;
 
exit Daemon::Control->new(
    init_code => <<'INIT',
export PERLBREW_ROOT=/data/perl5
. /data/perl5/etc/bashrc
INIT
 
    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        => path(__FILE__)->realpath,
 
    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;