summaryrefslogtreecommitdiffstats
path: root/network/open-isns/rc.isnsd
blob: 7067f16f488aba17c300807c214c0ee2c6a19960 (plain)
#!/bin/sh

# Read alternative ARGS line from /etc/default/isnsd.
test -f /etc/default/isnsd && source /etc/default/isnsd

case "$1" in
  start)
    echo "starting isnsd"
    /usr/sbin/isnsd $ARGS
    ;;
  stop)
    echo "stopping isnsd"
    pkill -F /var/run/isnsd.pid
    ;;
  status)
    echo "$(pgrep -c -f /usr/sbin/isnsd) isnsd process(es) running"
    ;;
  restart)
    $0 stop; sleep 2; $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|status|reload|restart}"
    ;;
esac