source: titan/plugins/xupnpd/xupnpd.sh @ 41285

Last change on this file since 41285 was 33734, checked in by Stephan, 9 years ago

[xupnpd] check install path

  • Property svn:executable set to *
File size: 875 bytes
Line 
1#! /bin/sh
2#
3### BEGIN INIT INFO
4# Provides:             xupnpd
5# Required-Start:       $network
6# Required-Stop:        $network
7# Short-Description:    xupnpd Server
8### END INIT INFO
9
10export PATH=$PATH:/var/swap/bin:/mnt/swapextensions/bin:/var/bin
11
12if [ -e /mnt/swapextensions/bin/xupnpd ];then
13        INSTDIR=/mnt/swapextensions
14else
15        INSTDIR=/var/swap
16fi     
17export XUPNPDROOTDIR=$INSTDIR/etc/xupnpd
18
19model=`cat /etc/model`
20NAME=xupnpd
21DESC="xupnpd-$model"
22DAEMON=xupnpd
23USER=root
24GROUP=root
25IP=`ifconfig | grep inet | grep Bcast | awk '{print $2}' | cut -d":" -f2`
26 
27case $1 in
28  start)
29        bouquet2m3u http://$IP:22222/ $INSTDIR/etc/xupnpd/playlists
30    start-stop-daemon --verbose --start --exec xupnpd
31  ;;
32  stop)
33    start-stop-daemon --verbose --stop --exec xupnpd
34  ;;
35  restart)
36    $0 stop
37    $0 start
38  ;;
39  *)
40    echo "Usage: xupnpd.sh {start|restart|stop}"
41  ;;
42esac
Note: See TracBrowser for help on using the repository browser.