aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb/mariadb.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/mariadb/mariadb.initd')
-rw-r--r--main/mariadb/mariadb.initd7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/mariadb/mariadb.initd b/main/mariadb/mariadb.initd
index cb2a388b96..a652ffaf3f 100644
--- a/main/mariadb/mariadb.initd
+++ b/main/mariadb/mariadb.initd
@@ -6,7 +6,6 @@ getconf() {
}
retry="60"
-pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid")
extra_stopped_commands="setup"
command="/usr/bin/mysqld_safe"
command_args="--pid-file=$pidfile --syslog --nowatch"
@@ -23,6 +22,7 @@ setup() {
}
start_pre() {
+ pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid")
required_dirs=$(getconf datadir "/var/lib/mysql")
if [ ! -d $required_dirs/mysql ]; then
eerror "Datadir '$required_dirs' is empty or invalid."
@@ -33,3 +33,8 @@ start_pre() {
start_post() {
ewaitfile 10 $(getconf socket "/run/mysqld/mysqld.sock")
}
+
+stop_pre() {
+ pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid")
+}
+