in reply to Practical Proc::Daemon example
I added these to the example:
GetOptions( 'daemon!' => \$daemonize, "help" => \&usage, "reload" => \&reload, "restart" => \&restart, "start" => \&run, "status" => \&status, "stop" => \&stop ) or &usage; exit(0); # ================================================== sub usage { my ($opt_name, $opt_value) = @_; print "your usage text goes here...\n"; exit(0); } # ================================================== sub reload { my ($opt_name, $opt_value) = @_; print "reload process not implemented.\n"; } # ================================================== sub restart { my ($opt_name, $opt_value) = @_; &stop; &run; } # ==================================================
Yes, they are obvious, but since that is about all I did to the example to make it a "complete" test for my system, I figured that I'd toss it back a'cha.
THANKS!!!
Lee Crites
lee@critesclan.com
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Practical Proc::Daemon example
by Arunbear (Prior) on Dec 05, 2014 at 17:43 UTC |