~mythbuntu/mythtv/mythtv-fixes

100.1.195 by Mario Limonciello
Add upstart script into the packaging. It's been dropped upstream.
1
# MythTV Backend service
2
3
description     "MythTV Backend"
4
author          "Mario Limonciello <superm1@ubuntu.com>"
5
451 by Thomas Mashos
Changed upstart to look for NOT lo instead of lo
6
start on (local-filesystems and net-device-up IFACE!=lo and started udev-finish)
373 by Mario Limonciello
Stop on runlevels [016] rather than on the start of shutdown job. (LP: #542627)
7
stop on runlevel [016]
100.1.195 by Mario Limonciello
Add upstart script into the packaging. It's been dropped upstream.
8
9
#expect fork
10
respawn
349 by Thomas Mashos
Set backend to not respawn if it dies 2 times in 1 hour (LP: #654846)
11
respawn limit 2 3600
100.1.195 by Mario Limonciello
Add upstart script into the packaging. It's been dropped upstream.
12
350 by Mario Limonciello
Make sure mysql is pingable before trying to start the backend (LP: #609402)
13
pre-start script 
14
    [ -x /usr/sbin/mysqld ] || exit 0
15
    for i in `seq 1 30` ; do
16
       /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping && exit 0
17
       sleep .5
18
    done
19
end script
20
342 by Mario Limonciello
Modify the upstart script to load the LANG first. (LP: #541042)
21
script
22
	test -f /etc/default/locale && . /etc/default/locale || true
100.1.355 by Mario Limonciello
Convert to using a rsyslog mechanism for log files. Thanks Michael
23
	LANG=$LANG /usr/bin/mythbackend --syslog local7 --user mythtv
342 by Mario Limonciello
Modify the upstart script to load the LANG first. (LP: #541042)
24
end script