freebsd-ports/databases/virtuoso/files/virtuoso.sh.in
Max Khon 749b69c58d - OPTION'ify and fix Kerberos support (does not build with Heimdal).
- Add BUILD_DEPENDS on gawk.
- Remove debugging junk from startup script.
- Bump PORTREVISION.
2006-12-11 20:25:03 +00:00

51 lines
1.1 KiB
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: virtuoso
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable Virtuoso Universal Server:
#
# virtuoso_enable="YES"
# # optional
# virtuoso_config="%%PREFIX%%/virtuoso/db/virtuoso.ini"
# virtuoso_flags=""
#
# This scripts takes one of the following commands:
#
# start stop restart reload status
#
prefix=%%PREFIX%%
command=${prefix}/bin/virtuoso
. %%RC_SUBR%%
load_rc_config virtuoso
# set defaults
virtuoso_enable=${virtuoso_enable:-"NO"}
virtuoso_flags=${virtuoso_flags:-""}
virtuoso_user=virtuoso
eval virtuoso_config=${virtuoso_config:-"~${virtuoso_user}/db/virtuoso.ini"}
virtuoso_class=${virtuoso_class:-"default"}
name=virtuoso
rcvar=`set_rcvar`
command_args="-D ${virtuoso_data} ${virtuoso_flags}"
extra_commands="reload"
start_cmd="virtuoso_command start"
stop_cmd="virtuoso_command stop"
restart_cmd="virtuoso_command restart"
reload_cmd="virtuoso_command reload"
status_cmd="virtuoso_command status"
virtuoso_command()
{
su -l ${virtuoso_user} -c "exec ${command} ${command_args} ${rc_arg}"
}
run_rc_command "$1"