http://www.perlmonks.org?node_id=799705


in reply to Executing script in normal/daemon mode and adding start/stop capability

* How can I add start/stop commands for the script.

One way to do it would be to add the respective options to your script (as you're already using Getopt::Long, this should be rather straightforward).  The implementation would typically involve a pid-file to store the PID which you need to communicate with a potentially running instance of the script. Something like:

  • Comment on Re: Executing script in normal/daemon mode and adding start/stop capability