7 # System startup script for the upnp monitor.
10 # Provides: upnpmonitor
11 # Required-Start: $remote_fs $syslog
12 # Required-Stop: $remote_fs $syslog
14 # Default-Stop: 0 1 2 6
15 # Description: Start upnpmonitor
18 test -s /etc/rc.status && . /etc/rc.status && rc_reset
20 # Determine the base and follow a runlevel link name.
22 link=${base#*[SK][0-9][0-9]}
24 # Force execution if not called by a runlevel directory.
25 #test $link = $base && START_GLASSFISH=yes
26 #test "$START_UPNPMONITOR" = yes || exit 0
29 [[ -r /etc/profile.local ]] && . /etc/profile.local
32 exec=/opt/upnpmonitor/bin/upnpmonitor
34 lockfile=/var/lock/upnpmonitor
40 echo -n "Starting upnp monitor: "
41 if [[ ! -r "$lockfile" ]]
43 su upnpmonitor -c "$exec" > /var/log/upnpmonitor.log 2>&1 &
46 [ $rv -eq 0 ] && echo $pid > $lockfile
55 echo -n "Shutting down upnpmonitor: "
56 kill -2 $( < $lockfile )
80 echo -n "Checking for upnp monitor status..."
84 try-restart|condrestart)
85 if status $prog >/dev/null ; then
90 echo "Service ${0##*/} does not support the reload action " 1>&2
94 echo "Usage: $0 {start|stop|status|restart|try-restart|force-reload}" 1>&2