diff options
author | root <root@rshg054.dnsready.net> | 2013-03-09 00:04:40 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-03-09 00:04:40 -0800 |
commit | 92eac63df242654434dceb000bac083f6e81a6b9 (patch) | |
tree | 322b4e24c165c3064505d5dac1a3172f9a28151d /community/percona-server/mysqld.rc | |
parent | 53d9a0cf7cf894f08a1f6736b8f8440bd7b18a59 (diff) |
Sat Mar 9 00:04:39 PST 2013
Diffstat (limited to 'community/percona-server/mysqld.rc')
-rw-r--r-- | community/percona-server/mysqld.rc | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/community/percona-server/mysqld.rc b/community/percona-server/mysqld.rc deleted file mode 100644 index 07f6b7e4c..000000000 --- a/community/percona-server/mysqld.rc +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash - -# general config -. /etc/rc.conf -. /etc/rc.d/functions - -getPID() { - echo $(pgrep -u mysql mysqld 2>/dev/null); -} - -case "$1" in - start) - stat_busy "Starting Percona Server" - [ ! -d /var/run/mysqld ] && install -d -g mysql -o mysql /var/run/mysqld &>/dev/null - if [ -z "$(getPID)" ]; then - /usr/bin/mysqld_safe --user=mysql &>/dev/null & - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - timeo=30 - while [ $timeo -gt 0 ]; do - response=`/usr/bin/mysqladmin -uUNKNOWN_USER ping 2>&1` && break - echo "$response" | grep -q "mysqld is alive" && break - sleep 1 - let timeo=${timeo}-1 - done - if [ $timeo -eq 0 ]; then - stat_fail - exit 1 - else - echo $(getPID) > /var/run/mysqld/mysqld.pid - add_daemon mysqld - stat_done - fi - fi - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping Percona Server" - if [ ! -z "$(getPID)" ]; then - timeo=30 - kill $(getPID) &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - fi - while [ ! -z "$(getPID)" -a $timeo -gt 0 ]; do - sleep 1 - let timeo=${timeo}-1 - done - if [ -z "$(getPID)" ]; then - rm -f /var/run/mysqld/mysqld.pid &>/dev/null - rm_daemon mysqld - stat_done - else - stat_fail - exit 1 - fi - else - stat_fail - exit 1 - fi - ;; - - restart) - $0 stop - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 |