#!/bin/sh
### BEGIN INIT INFO
# Provides:          noc
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: noc initscript
# Description:       noc
### END INIT INFO

PREFIX=/opt/noc
LAUNCHER=./scripts/noc-launcher.py
cd $PREFIX

case "$1" in
    start)
        echo -n "Starting noc-launcher"
        $LAUNCHER start
        ;;
    stop)
        echo -n "Stopping noc-launcher"
        $LAUNCHER stop
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
esac
