1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00
freebsd-ports/www/glassfish/files/glassfish.in
2014-02-02 16:28:54 +00:00

30 lines
597 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: glassfish
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# glassfish_enable (bool): Set to NO by default.
# Set it to YES to enable doormand.
. /etc/rc.subr
name=glassfish
rcvar=glassfish_enable
load_rc_config $name
: ${glassfish_enable:=NO}
export PATH=${PATH}:%%LOCALBASE%%/bin
start_cmd="%%PREFIX%%/glassfish-%%GLASSFISHVERSION%%/bin/asadmin start-domain"
stop_cmd="%%PREFIX%%/glassfish-%%GLASSFISHVERSION%%/bin/asadmin stop-domain"
run_rc_command "$1"