diff options
Diffstat (limited to 'www/tomcat41/files/jakarta-tomcat.sh')
-rw-r--r-- | www/tomcat41/files/jakarta-tomcat.sh | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/www/tomcat41/files/jakarta-tomcat.sh b/www/tomcat41/files/jakarta-tomcat.sh index cbd3e16f99b1..b27dea9f7de5 100644 --- a/www/tomcat41/files/jakarta-tomcat.sh +++ b/www/tomcat41/files/jakarta-tomcat.sh @@ -1,15 +1,27 @@ #!/bin/sh +# -*- mode: Fundamental; tab-width: 4; -*- +# ex:ts=4 +# +# %%APP_TITLE%% startup script. +# +# $FreeBSD$ +# + # Set some variables -USER_NAME=%%USER_NAME%% MYSELF=`basename $0` case "$1" in start) - su -f -m ${USER_NAME} -c "exec %%CONTROL_SCRIPT%% start" && echo -n ' %%APP_SHORTNAME%%' + 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) - su -f -m ${USER_NAME} -c "exec %%CONTROL_SCRIPT%% stop" && echo -n ' %%APP_SHORTNAME%%' + 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 "" |