From acc2965258fb85aca1faf92ea8b65a25f964c8fa Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Tue, 1 Oct 2019 22:02:32 -0400 Subject: Initial --- templates/my.cnf.j2 | 3 +++ templates/run.j2 | 7 +++++++ templates/user-my.cnf.j2 | 15 +++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 templates/my.cnf.j2 create mode 100644 templates/run.j2 create mode 100644 templates/user-my.cnf.j2 (limited to 'templates') diff --git a/templates/my.cnf.j2 b/templates/my.cnf.j2 new file mode 100644 index 0000000..cd6778f --- /dev/null +++ b/templates/my.cnf.j2 @@ -0,0 +1,3 @@ +[client-server] +[mysqld] +{{mariadb_opts}} diff --git a/templates/run.j2 b/templates/run.j2 new file mode 100644 index 0000000..f962193 --- /dev/null +++ b/templates/run.j2 @@ -0,0 +1,7 @@ +#!/bin/sh +mkdir -p /run/mysqld && chown mysql:mysql /run/mysqld +datadir="$(sed -rne's/^datadir ?= ?//p' /etc/my.cnf)" +if ! [ -d "$datadir" ] ; then + mysql_install_db --user=mysql +fi +exec chpst -u mysql:mysql mysqld diff --git a/templates/user-my.cnf.j2 b/templates/user-my.cnf.j2 new file mode 100644 index 0000000..1a952e7 --- /dev/null +++ b/templates/user-my.cnf.j2 @@ -0,0 +1,15 @@ +[client] +user=root +password="{{mariadb_root_passwd}}" + +[mysql] +user=root +password="{{mariadb_root_passwd}}" + +[mysqldump] +user=root +password="{{mariadb_root_passwd}}" + +[mysqldiff] +user=root +password="{{mariadb_root_passwd}}" -- cgit v1.2.3