3 # /etc/rc.d/mysqld: start/stop mysqld daemon
6 SSD
=/sbin
/start-stop-daemon
10 PID
=/var
/run
/mysql
/mysqld.pid
11 LOG
=/var
/log
/mysqld.log
12 OPTS
="--pid-file=$PID"
16 $SSD --start -bC --pidfile $PID --exec $PROG -- $OPTS >> $LOG 2>&1
19 $SSD --stop --remove-pidfile --retry 10 --name=$NAME --pidfile $PID
26 $SSD --status --name=$NAME --pidfile $PID
28 0) echo "$PROG is running with pid $(cat $PID)" ;;
29 1) echo "$PROG is not running but the pid file $PID exists" ;;
30 3) echo "$PROG is not running" ;;
31 4) echo "Unable to determine the program status" ;;
35 echo "usage: $0 [start|stop|restart|status]"