azuma, kuniyuki

NAME

Haineko::CLI::Daemon - Haineko server control class

DESCRIPTION

Haineko::CLI::Daemon provide methods for controlling Haineko server: to start, stop, reload, and restart server.

SYNOPSIS

    use Haineko::CLI::Daemon;
    my $p = { 'pidfile' => '/tmp/haineko.pid' };
    my $d = Haineko::CLI::Daemon->new( %$p );

    $d->parseoptions;   # Parse command-line options
    $d->makepf;         # Make a pid file
    $d->run;            # Start haineko server
    $d->ctrl('stop');   # Stop haineko server
    $d->ctrl('reload'); # Send ``USR1'' signal to the server
    $d->ctrl('restart');# Send ``HUP'' signal to the server

INSTANCE METHODS

run()

run() method starts haineko server

    my $p = { 'pidfile' => '/tmp/haineko.pid' };
    my $e = Haineko::CLI::Daemon->new( %$p );

    $e->parseoptions;
    $e->run;

ctrl( action )

ctrl() is a method for controlling haineko server process. ctrl('start') calls run() method, ctrl('stop') stops running haineko server, ctrl('reload') sends USR1 signal to the server, and ctrl('restart') sends HUP signal to the server.

parseoptions()

parseoptions() method parse options given at command line and returns the value of run-mode.

help()

help() prints help message of Haineko::CLI::Daemon for command line.

SEE ALSO

REPOSITORY

https://github.com/azumakuniyuki/Haineko

AUTHOR

azumakuniyuki <perl.org [at] azumakuniyuki.org>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.




Hosting generously
sponsored by Bytemark