1999-01-04 21:21:59 +01:00
|
|
|
#!/bin/sh
|
2002-05-16 09:49:43 +02:00
|
|
|
|
2002-11-14 03:25:20 +01:00
|
|
|
OPTIONS="-u bin"
|
2002-11-12 00:53:57 +01:00
|
|
|
# Uncomment the following if you want to use a TCP connection
|
|
|
|
# instead of a UNIX domain socket.
|
2002-11-14 03:25:20 +01:00
|
|
|
#OPTIONS="-u bin -inet"
|
2002-11-12 00:53:57 +01:00
|
|
|
|
2002-05-16 09:49:43 +02:00
|
|
|
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
|
|
|
|
echo "$0: Cannot determine the PREFIX" >&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
2000-07-05 14:37:06 +02:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2002-05-16 09:49:43 +02:00
|
|
|
if [ -x ${PREFIX}/sbin/cannaserver ]; then
|
|
|
|
@RM@ -f /tmp/.iroha_unix/IROHA
|
|
|
|
@TOUCH@ /var/log/CANNA0msgs
|
|
|
|
@CHOWN@ bin:bin /var/log/CANNA0msgs
|
2002-11-12 00:53:57 +01:00
|
|
|
${PREFIX}/sbin/cannaserver ${OPTIONS} && echo -n ' canna'
|
2000-07-05 14:37:06 +02:00
|
|
|
fi
|
2000-07-07 13:31:00 +02:00
|
|
|
;;
|
2000-07-05 14:37:06 +02:00
|
|
|
stop)
|
2002-05-16 09:49:43 +02:00
|
|
|
${PREFIX}/sbin/cannakill && echo -n ' canna'
|
2000-07-05 14:37:06 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: `basename $0` {start|stop}" >&2
|
|
|
|
exit 64
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|