summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/mythbackend/run
blob: 96d21ee6a1d3638deb5e19845f9f4c6437c260a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
exec 2>&1
. /etc/systemconfig
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions
#profile is here to setup LC_ALL/locale
MYTH_RUN_STATUS="1"
. /etc/profile 


stat_runit "Scanning for new storage"
MYTHCONFDIR=/usr/share/mythtv /usr/LH/bin/add_storage.py --report > /dev/null
if [ -e /tmp/scan_report ]
then
        echo "#####################################################"
        echo "                New storage found                    "
        echo ""
        cat /tmp/scan_report
        echo ""
        echo "  run /usr/LH/bin/add_storage.py to make it available "
        echo "#######################################################"

fi

stat_runit "Starting MythBackend"
export HOME=/root
if [ ! x$SystemType = xSlave_backend ]
then
	sv start mysql > /dev/null 2>/dev/null
fi
#echo "Starting mythbackend"
# 	if [ -f /tmp/debug ]
# 		then
# 			echo "using gbd/debug"
# 			gdb /usr/bin/mythbackend -x $MV_ROOT/mbegdbcommands.txt
# 			bash -c "osdClient.pl localhost 5000 'Restart gdb mbe  :::SYS' "&
# 			mv gdb.txt /data/home/mythtv/gdb.txt.mythbackend
# 			chown mythtv:mythtv /data/home/mythtv/gdb.txt.mythbackend
# 			sleep 10
#
# 		else
			exec su mythtv -c "/usr/bin/mythbackend -q --logpath /var/log/mythtv/" 
# 		fi