if [ -f "$pid_file" ]; then
if /bin/ps p `cat $pid_file` | grep mysqld >/dev/null; then
# Warning, running...
- return 0
+ return ${EXIT_CODE_WARNING}
else
rm -f $pid_file
if [ -f $pid_file ]; then
- return 1
+ return ${EXIT_CODE_FAILURE}
fi
fi
fi
-
+
/usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null &
return $?
}
sleep 1
done
if [ -s $pid_file ]; then
- return 1
+ return ${EXIT_CODE_FAILURE}
fi
return 0
else
# print_status warning not_running
- return 1
+ return ${EXIT_CODE_WARNING}
fi
}
case "$1" in
start)
- cmd_run_log_box "MySQL start" mysql_start
+ cmd_run_log_box_warn "MySQL start" mysql_start
;;
-
+
stop)
- cmd_run_log_box "MySQL stop" mysql_stop
+ cmd_run_log_box_warn "MySQL stop" mysql_stop
;;
-
+
reload)
- cmd_run_log_box "MySQL reload" reloadproc mysqld
+ cmd_run_log_box_warn "MySQL reload" reloadproc mysqld
;;
-
+
restart)
$0 stop
sleep 1
status)
statusproc mysqld
;;
-
+
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit ${EXIT_CODE_FAILURE}