๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
652 B

2 years ago
#!/sbin/openrc-run
retry="60"
directory={{ mariadb_data_dir | quote }}
pidfile="/var/run/mysqld/$SVCNAME.pid"
command="/usr/bin/mariadbd-safe"
command_args="--defaults-file={{ (mariadb_conf_dir ~ '/mariadb.conf') | quote }} --syslog --nowatch --pid-file=$pidfile --datadir={{ mariadb_data_dir | quote }} --user={{ mariadb_user }}"
command_user="{{ mariadb_user }}:{{ mariadb_group }}"
#command_background=true
depend() {
use net
need localmount
}
start_pre() {
mkdir -p /var/run/mysqld
chown {{ mariadb_user }}:{{ mariadb_group }} /var/run/mysqld
}
start_post() {
ewaitfile 15 {{ mariadb_socket | quote }}
}