229c3f67eb
in ${PREFIX}/etc/rc.d and the control script in ${PREFIX}/bin have been refactored and now actually work very well. Using the 'www' user and group, creating them if they don't exist. I've used the same approach as www/apache13. STDOUT_LOG and STDERR_LOG are now fixed (no ?= anymore) since the package deinstall does not support a different location. This fixes the first half of PR 28624. See: http://www.freebsd.org/cgi/query-pr.cgi?pr=34931 Reported by: Kees Jan Koster <k.j.koster@kpn.com>
20 lines
384 B
Bash
20 lines
384 B
Bash
#!/bin/sh
|
|
|
|
# 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%%'
|
|
;;
|
|
stop)
|
|
su -f -m ${USER_NAME} -c "exec %%CONTROL_SCRIPT%% stop" && echo -n ' %%APP_SHORTNAME%%'
|
|
;;
|
|
*)
|
|
echo ""
|
|
echo "Usage: ${MYSELF} { start | stop }"
|
|
echo ""
|
|
exit 64
|
|
;;
|
|
esac
|