1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/www/cocoon/files/cocoon.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

44 lines
1.0 KiB
Bash

#! /bin/sh
#
# $FreeBSD$
#
# PROVIDE: %%APP_NAME%%
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable %%APP_NAME%%:
#
# %%APP_NAME%%_enable="YES"
#
. /etc/rc.subr
name=%%APP_NAME%%
rcvar=%%APP_NAME%%_enable
command="%%PREFIX%%/sbin/%%APP_NAME%%ctl"
command_args="start"
pidfile=%%PID_FILE%%
# set defaults
%%APP_NAME%%_enable=${%%APP_NAME%%_enable:-"NO"}
%%APP_NAME%%_user=${%%APP_NAME%%_user:-"www"}
%%APP_NAME%%_group=${%%APP_NAME%%_group:-"www"}
load_rc_config ${name}
if test -n "${%%APP_NAME%%_java_version}" ; then
JAVA_HOME=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2)
procname=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2)
else
JAVA_HOME=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2)
procname=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2)
fi
export JAVA_HOME
run_rc_command "$1"