Skip to content
Newer
Older
100644 46 lines (39 sloc) 1.16 KB
f187d19 @pruperting added get_iplayer startup script
authored Feb 19, 2012
1 #! /bin/sh
2
3 # Author: prupert
4 # Basis: Parts of the script based on and inspired by work from
5 # daemox (ainer.org) tret (sabnzbd.org), beckstown (xbmc.org),
6 # and midgetspy (sickbeard.com).
7 # Fixes: Alek (ainer.org), James (ainer.org), Tophicles (ainer.org),
8 # croontje (sickbeard.com)
9 # Contact: http://www.prupert.co.uk
10 # Version: 0.1
11
12 ### BEGIN INIT INFO
13 # Provides: get_iplayer
14 # Required-Start: $all
15 # Required-Stop: $all
16 # Default-Start: 2 3 4 5
17 # Default-Stop: 0 1 6
18 # Short-Description: starts and stops get_iplayer web pvr
19 # Description: get_iplayer web pvr:
20 ### END INIT INFO
21
22 #Required -- Must Be Changed!
23 USER="rupert" #Set Linux Mint, Ubuntu, or Debian user name here.
24 GETIPLAYER="/home/rupert/src/get_iplayer"
25
26 #Script -- No changes needed below.
27 case "$1" in
28 start)
29 #Start get_iplayer web pvr and send all messages to /dev/null.
30 echo "Starting get_iplayer"
31 sudo -u $USER -EH nohup perl $GETIPLAYER/get_iplayer.cgi -p 8082 -l 0.0.0.0 -g $GETIPLAYER/get_iplayer > /dev/null 2>&1 &
32 ;;
33 stop)
34 #Shutdown get_iplayer
35 echo "Stopping get_iplayer"
36 sudo killall get_iplayer.cgi
37 sleep 6s
38 ;;
39 *)
40 echo "Usage: $0 {start|stop}"
41 exit 1
42 esac
43
44 exit 0
45
Something went wrong with that request. Please try again.