mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-08-25 19:58:41 +02:00
* FreeBSD/pandora_agent: Fixed path of the daemon command. > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Empty fields above will be automatically removed. M unix/ChangeLog M unix/FreeBSD/pandora_agent git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10421 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
46 lines
1.0 KiB
Bash
Executable File
46 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# **********************************************************************
|
|
# Pandora FMS Agent Daemon launcher for FreeBSD
|
|
# (c) 2010 Junichi Satoh <junichi@rworks.jp>
|
|
# (c) 2014 Koichiro Kikuchi <koichiro@rworks.jp>
|
|
#
|
|
# **********************************************************************
|
|
|
|
# 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=pandora_agent_enable
|
|
|
|
# read configuration and set defaults
|
|
pandora_agent_enable=${pandora_agent_enable:-"NO"}
|
|
load_rc_config "$name"
|
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
|
|
|
|
pidfile=/var/run/$name.pid
|
|
required_files="/usr/local/etc/pandora/pandora_agent.conf"
|
|
stop_postcmd=stop_postcmd
|
|
|
|
command=/usr/sbin/daemon
|
|
command_interpreter=/usr/local/bin/perl
|
|
procname=/usr/local/bin/pandora_agent
|
|
|
|
command_args="-cfp $pidfile $procname /usr/local/etc/pandora"
|
|
|
|
stop_postcmd()
|
|
{
|
|
rm -f $pidfile
|
|
}
|
|
|
|
run_rc_command "$1"
|