The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

System::InitD::Runner

DESCRIPTION

Simple module to process common init.d tasks. init.d bash scripts replacement

AUTHOR

Dmitriy @justnoxx Shamatrin

USAGE

new

new(%)

Constructor, params:

start

A start command

usage

Usage line, called by script usage

daemon_name

Now unused, reserved for output format

restart_timeout

Timeout between stop and start in restart

pid_file

Path to pid file, which used for monitoring

process_name

EXACT daemon process name. Need for preventing wrong kill.

kill_signal

Signal, which used for daemon killing.

run

Runner itself, service sub Never returns. Insted exit()s with error or success, or throws exception in some cases.

restart

stops and start daemon, stop errors (except fatals) are ignored. start return code returned as restart return code

load

load($,\&)

Loads additional actions to init script, for example, add `script hello` possible via:

$runner->load('hello', sub {print 'Hello world'})

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 3:

Unknown directive: =head

Around line 253:

'=item' outside of any '=over'

=over without closing =back