#!/sbin/sh # # /etc/init.d/canna - Start/Stop the canna server # CANNADIR=/usr/local/canna case "$1" in 'start') # start the cannaserver if [ -f $CANNADIR/bin/cannaserver ] then echo "starting cannaserver." if [ -f /var/spool/canna/lock/.CANNALOCK ] then rm /var/spool/canna/lock/.CANNALOCK fi $CANNADIR/bin/cannaserver fi ;; 'stop') # stop the cannaserver if [ -f $CANNADIR/bin/cannakill ] then echo "stopping cannaserver." $CANNADIR/bin/cannakill if [ -r /tmp/.iroha_unix/IROHA ] then rm /tmp/.iroha_unix/IROHA fi fi ;; *) echo "usage: /etc/init.d/canna {start|stop}" ;; esac