package/mariadb: rename MYSQL_PID variable in sysv startup script
authorRyan Coe <bluemrp9@gmail.com>
Tue, 4 Feb 2020 01:21:57 +0000 (17:21 -0800)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 4 Feb 2020 13:57:20 +0000 (14:57 +0100)
For consistency with the to-be-added MYSQL_LOGFILE variable.

Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/mariadb/S97mysqld

index 7f9ced31e970afbe785a4b8e49431facb3b88234..ffd3712400f6bbb184465aab36c1e9b38729a812 100644 (file)
@@ -5,7 +5,7 @@
 
 MYSQL_LIB="/var/lib/mysql"
 MYSQL_RUN="/run/mysql"
-MYSQL_PID="$MYSQL_RUN/mysqld.pid"
+MYSQL_PIDFILE="$MYSQL_RUN/mysqld.pid"
 MYSQL_BIN="/usr/bin"
 
 wait_for_ready() {
@@ -41,7 +41,7 @@ start() {
        # We don't use start-stop-daemon because mysqld has its own
        # wrapper script.
        printf "Starting mysql ... "
-       $MYSQL_BIN/mysqld_safe --pid-file=$MYSQL_PID --user=mysql \
+       $MYSQL_BIN/mysqld_safe --pid-file=$MYSQL_PIDFILE --user=mysql \
                > /dev/null 2>&1 &
        wait_for_ready
        [ $? = 0 ] && echo "OK" || echo "FAIL"
@@ -49,8 +49,8 @@ start() {
 
 stop() {
        printf "Stopping mysql ... "
-       if [ -f $MYSQL_PID ]; then
-               kill `cat $MYSQL_PID` > /dev/null 2>&1
+       if [ -f $MYSQL_PIDFILE ]; then
+               kill `cat $MYSQL_PIDFILE` > /dev/null 2>&1
                [ $? = 0 ] && echo "OK" || echo "FAIL"
        else
                echo "FAIL"