~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid

15 by Mario Limonciello
* Convert the package from using sysvinit to upstart
1
# MySQL Service
2
3
description     "MySQL Server"
4
author          "Mario Limonciello <superm1@ubuntu.com>"
5
6
start on (net-device-up
7
          and local-filesystems)
8
stop on runlevel [016]
9
16 by Mario Limonciello
Add in the respawn clause to the upstart script.
10
respawn
11
15 by Mario Limonciello
* Convert the package from using sysvinit to upstart
12
env HOME=/etc/mysql
16 by Mario Limonciello
Add in the respawn clause to the upstart script.
13
umask 007
15 by Mario Limonciello
* Convert the package from using sysvinit to upstart
14
15
pre-start script
16
    #Sanity checks
17
    [ -r $HOME/my.cnf ]
18
    [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
19
    LC_ALL=C BLOCKSIZE= df --portability /var/lib/mysql/. | tail -n 1 | awk '{ exit ($4<4096) }'
20
end script
21
16 by Mario Limonciello
Add in the respawn clause to the upstart script.
22
exec /usr/sbin/mysqld
15 by Mario Limonciello
* Convert the package from using sysvinit to upstart
23
24
post-start script
25
    while ! /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
26
    do
27
        sleep 1
28
    done
29
    exec $HOME/debian-start
30
end script