bbfb03d5ed
This is a bundle of several ports covering many typical requirements for building an Apple WebObjects deployment environment. Each port is or has a dependancy with some other port in the bundle, and have therefore been lodged collectively. databases/frontbase: FrontBase is a high performance, scalable, SQL 92 compliant relational database server created in the internet age for universal deployment. WWW: http://www.frontbase.com/ PR: ports/117299 Submitted by: Quinton Dolan <q@onthenet.com.au>
58 lines
1.3 KiB
Bash
58 lines
1.3 KiB
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
# PROVIDE: frontbase
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Define these frontbase_* variables in one of these files:
|
|
# /etc/rc.conf
|
|
# /etc/rc.conf.local
|
|
#
|
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
|
#
|
|
name="frontbase"
|
|
|
|
frontbase_enable="${frontbase_enable-NO}"
|
|
frontbase_user="${frontbase_user-frontbase}"
|
|
frontbase_flags="${frontbase_flags--autostart}"
|
|
frontbase_pidfile="${frontbase_pidfile-/var/run/frontbase.pid}"
|
|
frontbase_logfile="${frontbase_logfile-/var/log/frontbase.log}"
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
rcvar=`set_rcvar`
|
|
|
|
logfile=${frontbase_logfile}
|
|
runuser=${frontbase_user}
|
|
|
|
procname1="%%PREFIX%%/FrontBase/bin/FBExec"
|
|
procname2="%%PREFIX%%/FrontBase/bin/FrontBase"
|
|
logargs=">>${logfile} 2>&1"
|
|
command="%%PREFIX%%/FrontBase/bin/FBExec"
|
|
command_args="-daemon ${logargs}"
|
|
|
|
load_rc_config $name
|
|
start_precmd="start_precmd"
|
|
stop_cmd="stop_cmd"
|
|
|
|
start_precmd() {
|
|
touch ${logfile} && chown ${runuser} ${logfile}
|
|
}
|
|
|
|
stop_cmd() {
|
|
rc_pid="$(check_process ${procname1}) $(check_process ${procname2})"
|
|
|
|
echo "Stopping ${name}."
|
|
_doit="kill -${sig_stop:-TERM} $rc_pid"
|
|
if [ -n "$_user" ]; then
|
|
_doit="su -m $_user -c 'sh -c \"$_doit\"'"
|
|
fi
|
|
eval $_doit
|
|
_return=$?
|
|
[ $_return -ne 0 ] && [ -z "$rc_force" ] && return 1
|
|
wait_for_pids $rc_pid
|
|
}
|
|
|
|
run_rc_command "$1"
|