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