mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 19:36:44 +02:00
the mysql_release build config was overriding all the settings. the cmake -L was breaking them too.. plugin_partition was always false from the mysql_release, and doesn't build
36 lines
755 B
Bash
Executable file
36 lines
755 B
Bash
Executable file
#!/sbin/openrc-run
|
|
extra_stopped_commands="setup"
|
|
|
|
retry="60"
|
|
pidfile="/run/mysqld/$RC_SVCNAME.pid"
|
|
command="/usr/bin/mysqld_safe"
|
|
command_args="--syslog --nowatch --pid-file=$pidfile"
|
|
|
|
depend() {
|
|
use net
|
|
need localmount
|
|
}
|
|
|
|
start_pre() {
|
|
required_dirs=$(getconf datadir "/var/lib/mysql")
|
|
|
|
if [ ! -d $required_dirs/mysql ]; then
|
|
eerror "Datadir '$required_dirs' is empty or invalid."
|
|
eerror "Run '/etc/init.d/mariadb setup' to create new database."
|
|
fi
|
|
}
|
|
|
|
start_post() {
|
|
ewaitfile 10 $(getconf socket "/run/mysqld/mysqld.sock")
|
|
}
|
|
|
|
setup() {
|
|
ebegin "Creating a new MySQL database"
|
|
mysql_install_db --user=mysql --datadir=/var/lib/mysql
|
|
eend $?
|
|
}
|
|
|
|
getconf() {
|
|
v=$(my_print_defaults --mysqld | grep ^--$1)
|
|
[ -z $v ] && echo $2 || echo ${v#*=}
|
|
}
|