freebsd-ports/www/jakarta-tomcat4/files/startup.sh
Ernst de Haan 00af56ae88 Lot of changes: Using USE_JAVA infrastructure. Upgraded port
to 3.3.1. Using HTTP_PORT i.s.o. LISTEN_PORT. Using
daemonctl.c i.s.o. tomcatctl shell script. Displaying steps
i.s.o. commands being executed. Synced man page.
2002-03-30 14:51:12 +00:00

32 lines
639 B
Bash

#!/bin/sh
# -*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
#
# %%APP_TITLE%% startup script.
#
# $FreeBSD$
#
# Set some variables
MYSELF=`basename $0`
case "$1" in
start)
truncate -s 0 %%PID_FILE%%
chown %%USER%%:%%GROUP%% %%PID_FILE%%
chmod 600 %%PID_FILE%%
su -f -m %%USER%% -c "exec %%CONTROL_SCRIPT%% start > /dev/null" && echo -n ' %%APP_SHORTNAME%%'
;;
stop)
chown %%USER%%:%%GROUP%% %%PID_FILE%%
chmod 600 %%PID_FILE%%
su -f -m %%USER%% -c "exec %%CONTROL_SCRIPT%% stop > /dev/null" && echo -n ' %%APP_SHORTNAME%%'
;;
*)
echo ""
echo "Usage: ${MYSELF} { start | stop }"
echo ""
exit 64
;;
esac