CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
mysql: updated to 5.7.23
[ports/opt-arm.git] / mysql / mysqld
... / ...
CommitLineData
1#!/bin/sh
2#
3# /etc/rc.d/mysqld: start/stop mysqld daemon
4#
5
6SSD=/sbin/start-stop-daemon
7PROG=/usr/sbin/mysqld
8MYSQL_CFG=/etc/my.cnf
9PID=/var/run/mysql/mysqld.pid
10LOG=/var/log/mysqld.log
11OPTS="--pid-file=$PID"
12
13case $1 in
14start)
15 $SSD --start -bC --pidfile $PID --exec $PROG -- $OPTS >> $LOG 2>&1
16 ;;
17stop)
18 $SSD --stop --remove-pidfile --retry 10 --pidfile $PID
19 ;;
20restart)
21 $0 stop
22 $0 start
23 ;;
24status)
25 $SSD --status --pidfile $PID
26 case $? in
27 0) echo "$PROG is running with pid $(cat $PID)" ;;
28 1) echo "$PROG is not running but the pid file $PID exists" ;;
29 3) echo "$PROG is not running" ;;
30 4) echo "Unable to determine the program status" ;;
31 esac
32 ;;
33*)
34 echo "usage: $0 [start|stop|restart|status]"
35 ;;
36esac
37
38# End of file