#!/bin/bash # $Id$ #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k #%start: 60 #%stop: 80 #deps #%needs: #%before: #%after: source /etc/conf.d/rc source $rc_functions case "$1" in start) rc_print "Starting mysql daemon ..." /usr/bin/mysqld_safe > /dev/null 2>&1 & evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) rc_print "Stopping mysql daemon ..." start-stop-daemon --stop --quiet \ --pidfile=/run/mysqld/mysqld.pid --retry 20 evaluate_retval update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/mysqld ;; *) rc_echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac