Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:467427
Created Jul 7, 2010

What would you like to do?
root@isodb02:/etc/init# cat mysql.conf
# MySQL Service
description "MySQL Server"
author "Mario Limonciello <superm1@ubuntu.com>"
start on (net-device-up
and local-filesystems)
stop on runlevel [016]
respawn
env HOME=/etc/mysql
umask 007
pre-start script
#Sanity checks
[ -r $HOME/my.cnf ]
[ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
# Load AppArmor profile
if aa-status --enabled 2>/dev/null; then
apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld || true
fi
LC_ALL=C BLOCKSIZE= df --portability /var/lib/mysql/. | tail -n 1 | awk '{ exit ($4<4096) }'
end script
exec /usr/sbin/mysqld
post-start script
while ! /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
do
sleep 1
done
exec $HOME/debian-start
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment