aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb/mariadb.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-03-21 19:27:15 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2016-03-21 20:44:16 +0100
commit13d027613dc9bc51202eb338821c558580c031a4 (patch)
tree046f84c7b5b049d046e348825440d55b0f59cc6b /main/mariadb/mariadb.initd
parent2568cbd5a3b32ba035507440ec636eb83cb25239 (diff)
downloadaports-13d027613dc9bc51202eb338821c558580c031a4.tar.bz2
aports-13d027613dc9bc51202eb338821c558580c031a4.tar.xz
main/mariadb: fix init.d script
- find the pidfile from *_pre script instead from global scope - move init.d script to the server package instead of -common
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")
+}
+