Hello
i've got a little program that start a toc server (it is a sh script);
in it stands
Code:
#! /bin/sh
#Additional arguments for the Server
prefix="TOCserver"
args=" server OBJ-Anvil.to2?AdminName=colddot?AdminPassword=xxxxxxx -ini=../TOCrossfire/Conf/$prefix.ini userini=../TOCross
fire/Conf/$prefix.user.ini log=../TOCrossfire/Log/$prefix.log -nohomedir"
arch=`uname -m`
if [ $arch = "i686" ]; then
bin="ucc-bin"
elif [ $arch = "x86_64" ]; then
bin="ucc-bin-linux-amd64"
elif [ $arch = "Power Macintosh" ]; then
bin="ucc-bin-macosx"
else
echo "Your system is not supported !"
exit 0
fi
while [ true ]; do
cd /var/server/ut/public/System
./$bin $args
sleep 5
done
now what i want to do is making a nicly init.d script
but i want no output from the program it self
so i have maded this
Code:
#! /bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/toc
NAME=toc
DESC="tactical ops crossfire"
test -f $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet -m -b --pidfile /var/run/$NAME.pid \
--exec $DAEMON
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
the starting works fine but the shutdown it don't work.
is there a solution on this?
greets kevin
Recent comments
19 hours 58 min ago
1 day 5 hours ago
1 day 6 hours ago
1 day 9 hours ago
1 day 14 hours ago
1 day 14 hours ago
1 day 16 hours ago
2 days 2 hours ago
2 days 7 hours ago
2 days 9 hours ago