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
index eb9b74e06e23020e1f6094737e8285ea300a48d7..504c1a2525f86a60bd975b6895865637ab31d457 100644 (file)
@@ -6,13 +6,13 @@
 SSD=/sbin/start-stop-daemon
 PROG=/usr/sbin/mysqld
 MYSQL_CFG=/etc/my.cnf
-PID=$(sed -n 's/^pid-file[ \t]*=[ \t]*//p' $MYSQL_CFG)
-USR=$(sed -n 's/^user[ \t]*=[ \t]*//p' $MYSQL_CFG)
+PID=/var/run/mysql/mysqld.pid
+LOG=/var/log/mysqld.log
+OPTS="--pid-file=$PID"
 
 case $1 in
 start)
-       touch $PID && chown $USR:$USR $PID
-       $SSD --start --background --pidfile $PID --exec $PROG
+       $SSD --start -bC --pidfile $PID --exec $PROG -- $OPTS >> $LOG 2>&1
        ;;
 stop)
        $SSD --stop --remove-pidfile --retry 10 --pidfile $PID