PageRenderTime 224ms CodeModel.GetById 222ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/init/mysql.conf

http://github.com/brinkman83/bashrc
Config | 39 lines | 32 code | 7 blank | 0 comment | 0 complexity | 5061e3474107632c8ec30b957016fa48 MD5 | raw file
 1# MySQL Service
 2
 3description     "MySQL Server"
 4author          "Mario Limonciello <superm1@ubuntu.com>"
 5
 6start on (net-device-up
 7          and local-filesystems
 8	  and runlevel [2345])
 9stop on runlevel [016]
10
11respawn
12
13env HOME=/etc/mysql
14umask 007
15
16pre-start script
17    #Sanity checks
18    [ -r $HOME/my.cnf ]
19    [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
20    # Load AppArmor profile
21    if aa-status --enabled 2>/dev/null; then
22        apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld || true
23    fi
24    LC_ALL=C BLOCKSIZE= df --portability /var/lib/mysql/. | tail -n 1 | awk '{ exit ($4<4096) }'
25end script
26
27exec /usr/sbin/mysqld
28
29post-start script
30    for i in `seq 1 30` ; do
31        /usr/bin/mysqladmin --defaults-file="${HOME}"/debian.cnf ping && {
32            exec "${HOME}"/debian-start
33            # should not reach this line
34            exit 2
35        }
36        sleep 1
37    done
38    exit 1
39end script