Commit 1aee9665 authored by unknown's avatar unknown

Merge qualinost.(none):/home/mtaylor/src/mysql/mysql-5.0-initstatus

into  qualinost.(none):/home/mtaylor/src/mysql/mysql-firsttwo

parents f4c619ba 60ffd7e3
...@@ -359,20 +359,43 @@ case "$mode" in ...@@ -359,20 +359,43 @@ case "$mode" in
fi fi
;; ;;
'reload') 'reload'|'force-reload')
if test -s "$server_pid_file" ; then if test -s "$server_pid_file" ; then
mysqld_pid=`cat $server_pid_file` read mysqld_pid < $server_pid_file
kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL" kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL"
touch $server_pid_file touch $server_pid_file
else else
log_failure_msg "MySQL PID file could not be found!" log_failure_msg "MySQL PID file could not be found!"
exit 1
fi fi
;; ;;
'status')
*) # First, check to see if pid file exists
# usage if [ -s "$server_pid_file" ] ; then
echo "Usage: $0 {start|stop|restart|reload} [ MySQL server options ]" read mysqld_pid < $server_pid_file
exit 1 if kill -0 $mysqld_pid 2>/dev/null ; then
log_success_msg "MySQL running ($mysqld_pid)"
exit 0
else
log_failure_msg "MySQL is not running, but PID file exists"
exit 1
fi
else
# Try to find appropriate mysqld process
mysqld_pid=`pidof $sbindir/mysqld`
if [ -z $mysqld_pid ] ; then
log_failure_msg "MySQL is not running"
exit 3
else
log_failure_msg "MySQL is running but PID file could not be found"
exit 4
fi
fi
;;
*)
# usage
echo "Usage: $0 {start|stop|restart|reload|force-reload|status} [ MySQL server options ]"
exit 1
;; ;;
esac esac
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment