aboutsummaryrefslogtreecommitdiff
path: root/branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-03-06 02:03:53 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-03-06 02:03:53 +0000
commit52a3537b8ebca3a5146cf363ffa6d716f2b00da0 (patch)
treeba684cac72fd8e2147f13d7c27d5a61d6133a444 /branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld
parentf93c3531707ac292b2d43f00c9a600d1ecdbb76d (diff)
downloadsimplepkg-52a3537b8ebca3a5146cf363ffa6d716f2b00da0.tar.gz
simplepkg-52a3537b8ebca3a5146cf363ffa6d716f2b00da0.tar.bz2
removing old 0.6 branch
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@798 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld')
-rw-r--r--branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld80
1 files changed, 0 insertions, 80 deletions
diff --git a/branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld b/branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld
deleted file mode 100644
index 239e2e6..0000000
--- a/branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-# Start/stop/restart mysqld.
-#
-# Copyright 2003 Patrick J. Volkerding, Concord, CA
-# Copyright 2003 Slackware Linux, Inc., Concord, CA
-#
-# This program comes with NO WARRANTY, to the extent permitted by law.
-# You may redistribute copies of this program under the terms of the
-# GNU General Public License.
-
-# To start MySQL automatically at boot, be sure this script is executable:
-# chmod 755 /etc/rc.d/rc.mysqld
-
-# Before you can run MySQL, you must have a database. To install an initial
-# database, do this as root:
-#
-# su - mysql
-# mysql_install_db
-#
-# Note that step one is becoming the mysql user. It's important to do this
-# before making any changes to the database, or mysqld won't be able to write
-# to it later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
-
-# To disallow outside connections to the database (if you don't need them, this
-# is recommended to increase security), uncomment the next line:
-#SKIP="--skip-networking"
-
-# Start mysqld:
-mysqld_start() {
- if [ -x /usr/bin/mysqld_safe ]; then
- # If there is an old PID file (no mysqld running), clean it up:
- if [ -r /var/run/mysql/mysql.pid ]; then
- if ! ps ax | grep mysqld 1> /dev/null 2> /dev/null ; then
- echo "Cleaning up old /var/run/mysql/mysql.pid."
- rm -f /var/run/mysql/mysql.pid
- fi
- fi
- /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP &
- fi
-}
-
-# Stop mysqld:
-mysqld_stop() {
- # If there is no PID file, ignore this request...
- if [ -r /var/run/mysql/mysql.pid ]; then
- killall mysqld
- # Wait at least one minute for it to exit, as we don't know how big the DB is...
- for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 \
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do
- if [ ! -r /var/run/mysql/mysql.pid ]; then
- break;
- fi
- sleep 1
- done
- if [ "$second" = "60" ]; then
- echo "WARNING: Gave up waiting for mysqld to exit!"
- sleep 15
- fi
- fi
-}
-
-# Restart mysqld:
-mysqld_restart() {
- mysqld_stop
- mysqld_start
-}
-
-case "$1" in
-'start')
- mysqld_start
- ;;
-'stop')
- mysqld_stop
- ;;
-'restart')
- mysqld_restart
- ;;
-*)
- echo "usage $0 start|stop|restart"
-esac