pandorafms/pandora_server/FreeBSD/pandora_server

37 lines
897 B
Bash
Executable File

#!/bin/sh
# **********************************************************************
# Pandora FMS Server Daemon launcher for FreeBSD
# (c) 2010 Junichi Satoh <junichi@rworks.jp>
#
# **********************************************************************
# PROVIDE: pandora_server
# REQUIRE: LOGIN mysql
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable `pandora_server':
#
# pandora_server_enable="YES"
#
. "/etc/rc.subr"
name="pandora_server"
rcvar=`set_rcvar`
# read configuration and set defaults
pandora_server_enable=${pandora_server_enable:-"NO"}
load_rc_config $name
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
pidfile=/var/run/$name.pid
command=/usr/local/bin/${name}
command_args="-D -P ${pidfile} /usr/local/etc/pandora/pandora_server.conf"
required_files="/usr/local/etc/pandora/pandora_server.conf"
procname="/usr/local/bin/perl"
run_rc_command "$1"