From 5b8e3203a6382998265371f810d41ba4e5f0a26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 21 Jan 2021 16:11:46 +0100 Subject: [PATCH] Import __recycledcloud_mysql (required by wordpress type) --- type/__recycledcloud_mysql/gencode-remote | 9 +++++++++ type/__recycledcloud_mysql/manifest | 13 +++++++++++++ type/__recycledcloud_mysql/singleton | 0 3 files changed, 22 insertions(+) create mode 100755 type/__recycledcloud_mysql/gencode-remote create mode 100644 type/__recycledcloud_mysql/manifest create mode 100644 type/__recycledcloud_mysql/singleton diff --git a/type/__recycledcloud_mysql/gencode-remote b/type/__recycledcloud_mysql/gencode-remote new file mode 100755 index 0000000..ca3ed0b --- /dev/null +++ b/type/__recycledcloud_mysql/gencode-remote @@ -0,0 +1,9 @@ +#!/bin/sh + +cat << EOF +if [ ! -d /var/lib/mysql/mysql ]; then + service mariadb setup +fi + +service mariadb start +EOF diff --git a/type/__recycledcloud_mysql/manifest b/type/__recycledcloud_mysql/manifest new file mode 100644 index 0000000..36fb8d8 --- /dev/null +++ b/type/__recycledcloud_mysql/manifest @@ -0,0 +1,13 @@ +#!/bin/sh + +os=$(cat "${__global:?}/explorer/os") +if [ "$os" != "alpine" ]; then + echo "This type is expected to run on Alpine Linux, not $os. Exiting." >&2 + exit 1 +fi + +__package mariadb +__package mariadb-client +require="__package/mariadb" __start_on_boot mariadb + +# See gencode-remote for service initialization. diff --git a/type/__recycledcloud_mysql/singleton b/type/__recycledcloud_mysql/singleton new file mode 100644 index 0000000..e69de29