1 | # MythTV Backend service |
---|
2 | |
---|
3 | description "MythTV Backend" |
---|
4 | author "Mario Limonciello <superm1@ubuntu.com>" |
---|
5 | |
---|
6 | start on (local-filesystems |
---|
7 | and net-device-up |
---|
8 | and runlevel [2345]) |
---|
9 | |
---|
10 | stop on runlevel [016] |
---|
11 | |
---|
12 | #expect fork |
---|
13 | respawn |
---|
14 | respawn limit 2 3600 |
---|
15 | |
---|
16 | pre-start script |
---|
17 | logger "mythtv-backend looking for mysql" |
---|
18 | [ -x /usr/sbin/mysqld ] || exit 0 |
---|
19 | for i in `seq 1 30` ; do |
---|
20 | /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping && exit 0 |
---|
21 | sleep .5 |
---|
22 | done |
---|
23 | logger "mythtv-backend couldn't get mysql" |
---|
24 | end script |
---|
25 | |
---|
26 | script |
---|
27 | logger "starting mythtv backend process" |
---|
28 | test -f /etc/default/locale && . /etc/default/locale || true |
---|
29 | LANG=$LANG /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log --user mythtv |
---|
30 | end script |
---|