System::InitD::Runner
Simple module to process common init.d tasks. init.d bash scripts replacement
Dmitriy @justnoxx Shamatrin
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.
Runner itself, service sub Never returns. Insted exit()s with error or success, or throws exception in some cases.
stops and start daemon, stop errors (except fatals) are ignored. start return code returned as restart return code
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:
Unknown directive: =head
'=item' outside of any '=over'
=over without closing =back
To install System::InitD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm System::InitD
CPAN shell
perl -MCPAN -e shell install System::InitD
For more information on module installation, please visit the detailed CPAN module installation guide.