00af56ae88
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.
32 lines
639 B
Bash
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
|