summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run
blob: 692e7dbbb196e81cfae900ce592d514b4430c790 (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
#!/bin/sh
exec 2>&1
. /etc/profile
. /etc/systemconfig
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions

export HOME=/root
if [ ! x$SystemType = xSlave_backend ]
then
	sv start mysql > /dev/null 2>/dev/null
        #run mythfilldatabase
        /usr/MythVantage/bin/initial_db_run &
fi
mkfifo /tmp/mbefifo >/dev/null 2>/dev/null
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 /usr/bin/mythbackend
		fi