blob: 6d2fdf5864e1507b0ad632191891ecbce11fdd52 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/sh
OPTIONS=
# Uncomment the following if you want to use a TCP connection
# instead of a UNIX domain socket.
#OPTIONS="-inet"
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 64
fi
case "$1" in
start)
if [ -x ${PREFIX}/sbin/cannaserver ]; then
@RM@ -f /tmp/.iroha_unix/IROHA
@TOUCH@ /var/log/CANNA0msgs
@CHOWN@ bin:bin /var/log/CANNA0msgs
${PREFIX}/sbin/cannaserver ${OPTIONS} && echo -n ' canna'
fi
;;
stop)
${PREFIX}/sbin/cannakill && echo -n ' canna'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
exit 64
;;
esac
exit 0
|