CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
ruby: updated to 1.9.3-p545
[ports/opt-arm.git] / mysql / mysqld
... / ...
CommitLineData
1#!/bin/sh
2#
3# /etc/rc.d/mysqld: start/stop mysqld daemon
4#
5
6MYSQL_CFG=/etc/my.cnf
7
8MYSQL_PID=`sed -n 's/^pid-file[ \t]*=[ \t]*//p' $MYSQL_CFG`
9MYSQL_USR=`sed -n 's/^user[ \t]*=[ \t]*//p' $MYSQL_CFG`
10
11case $1 in
12start)
13 touch $MYSQL_PID
14 chown $MYSQL_USR $MYSQL_PID
15 /usr/sbin/mysqld &
16 ;;
17stop)
18 killall -q /usr/sbin/mysqld
19 rm $MYSQL_PID
20 ;;
21restart)
22 $0 stop
23 sleep 2
24 $0 start
25 ;;
26*)
27 echo "usage: $0 [start|stop|restart]"
28 ;;
29esac
30
31# End of file