Daemon-Control/t/bin/02_sleep_perl_array.pl
Kaitlyn Parkhurst 0021b4eb9d Constructor now accepts a list
You can now pass a list to ->new() without wrapping it
as a hashref, since it's prettier and becoming expected
behavior.
2013-12-26 05:08:10 -05:00

23 lines
535 B
Perl

#!/usr/bin/perl
use warnings;
use strict;
use Daemon::Control;
Daemon::Control->new(
name => "My Daemon",
lsb_start => '$syslog $remote_fs',
lsb_stop => '$syslog',
lsb_sdesc => 'My Daemon Short',
lsb_desc => 'My Daemon controls the My Daemon daemon.',
path => '/usr/sbin/mydaemon/init.pl',
program => sub { sleep $_[1] },
program_args => [ 10 ],
pid_file => 'pid_tmp',
stderr_file => '/dev/null',
stdout_file => '/dev/null',
fork => 2,
)->run;