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