#! /bin/sh
### BEGIN INIT INFO
# Provides:          umlrun-uml
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/umlrun-server
NAME=umlrun-server
DESC="umlrun server"

test -f $DAEMON || exit 0

set -e

SSD_ARGS="--quiet --make-pidfile --pidfile /var/run/umlrun-server.pid --exec $DAEMON"

case "$1" in
  start)
	echo -n "Starting $DESC: "

        start-stop-daemon --start --background $SSD_ARGS

	echo "$NAME."
	;;
  stop)
	echo -n "Stopping $DESC: "

        start-stop-daemon --stop --oknodo $SSD_ARGS

	echo "$NAME."

	;;
  restart|force-reload)
	;;
esac

exit 0
