From be5b27af0704112bd28e07805b5ecec448457109 Mon Sep 17 00:00:00 2001 From: xZero707 Date: Tue, 19 Sep 2023 18:29:07 +0200 Subject: [PATCH] Add init-fix-permissions for fixing ownership/permission issues --- .../dependencies.d/init-mariadb-bootstrap | 0 .../etc/s6-overlay/s6-rc.d/init-fix-permissions/run | 12 ++++++++++++ .../etc/s6-overlay/s6-rc.d/init-fix-permissions/type | 1 + .../etc/s6-overlay/s6-rc.d/init-fix-permissions/up | 1 + .../svc-mariadb/dependencies.d/init-fix-permissions | 0 .../s6-rc.d/user/contents.d/init-fix-permissions | 0 6 files changed, 14 insertions(+) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/dependencies.d/init-mariadb-bootstrap create mode 100755 rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/run create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/up create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/svc-mariadb/dependencies.d/init-fix-permissions create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/init-fix-permissions diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/dependencies.d/init-mariadb-bootstrap b/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/dependencies.d/init-mariadb-bootstrap new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/run b/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/run new file mode 100755 index 0000000..772324a --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/run @@ -0,0 +1,12 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +# init-fix-permissions main +main() { + # This will prepend service name to all output from here + exec > >(while read line; do echo "[init-fix-permissions] ${line}"; done) 2>&1 + + lsiown -R abc:abc "${DATADIR}" + lsiown -R abc:abc "/config" +} +main diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/type b/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/type new file mode 100644 index 0000000..3d92b15 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/type @@ -0,0 +1 @@ +oneshot \ No newline at end of file diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/up b/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/up new file mode 100644 index 0000000..839f2b6 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/init-fix-permissions/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-fix-permissions/run \ No newline at end of file diff --git a/rootfs/etc/s6-overlay/s6-rc.d/svc-mariadb/dependencies.d/init-fix-permissions b/rootfs/etc/s6-overlay/s6-rc.d/svc-mariadb/dependencies.d/init-fix-permissions new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/init-fix-permissions b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/init-fix-permissions new file mode 100644 index 0000000..e69de29