diff options
Diffstat (limited to 'net-mgmt/pandorafms_agent/files/pandora_agent.in')
-rw-r--r-- | net-mgmt/pandorafms_agent/files/pandora_agent.in | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/net-mgmt/pandorafms_agent/files/pandora_agent.in b/net-mgmt/pandorafms_agent/files/pandora_agent.in new file mode 100644 index 000000000000..0caa3bee658e --- /dev/null +++ b/net-mgmt/pandorafms_agent/files/pandora_agent.in @@ -0,0 +1,34 @@ +#!/bin/sh + +# PROVIDE: pandora_agent +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following line to /etc/rc.conf to enable `pandora_agent': +# +# pandora_agent_enable="YES" +# + +. "/etc/rc.subr" + +name="pandora_agent" +rcvar=`set_rcvar` +load_rc_config "$name" + +# set defaults +: ${pandora_agent_enable:=NO} + +pidfile="/var/run/$name.pid" + +required_files="%%ETCDIR%%/pandora_agent.conf" + +command="/usr/sbin/daemon" +command_args="-cf -p ${pidfile} %%PREFIX%%/bin/pandora_agent %%ETCDIR%%" +procname="%%PERL%%" +stop_postcmd=stop_postcmd + +stop_postcmd() { + rm -f $pidfile +} + +run_rc_command "$1" |