Fix broken startup script.

PR:		23810
Submitted by:	Martin Kammerhofer <mkamm@gmx.net>
This commit is contained in:
Maxim Sobolev 2000-12-25 12:01:48 +00:00
parent c87a1c7222
commit eac04bb2ed
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=36335

View file

@ -1,14 +1,24 @@
#!/bin/sh
# $CVSHeader$
case $1 in
start)
test -d %%JDIR%% -a -x %%PREFIX%%/sbin/junkbuster -a -f %%JDIR%%/configfile || exit 1
if [ -d %%JDIR%% \
-a -x %%PREFIX%%/sbin/junkbuster-zlib \
-a -f %%JDIR%%/configfile ]; then
: seems OK
else
echo >&2 "$0: missing files!"
exit 1
fi
cd %%JDIR%%
su -m nobody -c "%%PREFIX%%/sbin/junkbuster configfile &"
echo -n " junkbuster"
su -m nobody -c "%%PREFIX%%/sbin/junkbuster-zlib configfile &" \
>/dev/null \
&& echo -n " junkbuster" \
|| echo " junkbuster FAILED TO START"
;;
stop)
killall junkbuster && echo -n " junkbuster"
killall junkbuster-zlib && echo -n " junkbuster"
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2