Ticket #10218: mythtv-backend.conf

File mythtv-backend.conf, 763 bytes (added by Willie Wilson <limcearna@…>, 8 years ago)
Line 
1# MythTV Backend service
2
3description     "MythTV Backend"
4author          "Mario Limonciello <superm1@ubuntu.com>"
5
6start on (local-filesystems
7        and net-device-up
8        and runlevel [2345])
9
10stop on runlevel [016]
11
12#expect fork
13respawn
14respawn limit 2 3600
15
16pre-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"
24end script
25
26script
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
30end script