Ticket #1 (assigned enhancement)

Opened 8 months ago

Last modified 8 months ago

pid file for snmp_proxy.pl

Reported by: candlerb Assigned to: pwh (accepted)
Priority: minor Milestone:
Component: codebase Version: HEAD
Keywords: Cc:

Description

It would be useful if snmp_proxy.pl would daemonize itself and write a pidfile to a configurable location, and also if a SysV init script were provided. This would make it easier for monit to monitor, start and stop the daemon.

At the moment, you have to work around it something like this:

 start="/bin/bash -c 'echo $$ > pidfile; exec snmp_proxy.pl'"
 stop="/bin/bash -c 'kill -s SIGTERM `cat pidfile`'"

Change History

05/03/08 12:55:03 changed by pwh

  • status changed from new to assigned.

Tasks to do:

  • Write an init script
  • Daemonize the proxy process
  • Make the proxy process fork on an incoming connection if SNMP.pm is thread-safe

05/11/08 20:35:34 changed by pwh

Revision 114 introduces proper daemon functionality - use "--daemon" to background immediately, and "--pidfile=" to write a PID file.

An init script will be written 'soon'.