From 79fd65e8838ec2e051b9682984da5bf652987567 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 25 Feb 2023 20:20:35 +0000 Subject: [PATCH 1/5] Inject branding --- README.md | 1 + docker-mods.v3 | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/README.md b/README.md index cb44ce0..ff186b2 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ These files are used by Linuxserver build processes to handle mods in our images. Not for end-user consumption. +* **25.02.23:** - Inject branding. * **05.02.23:** - Support multi-manifest mods for provenance, etc. * **21.01.23:** - Create with-contenv alias. * **01.01.23:** - Remove support for legacy custom script/service locations. diff --git a/docker-mods.v3 b/docker-mods.v3 index e21fb28..638ebc8 100755 --- a/docker-mods.v3 +++ b/docker-mods.v3 @@ -296,6 +296,74 @@ run_mods() { done } +run_branding() { + if [[ "${LSIO_FIRST_PARTY}" = "true" ]]; then + # intentional tabs in the heredoc + cat <<-EOF >/etc/s6-overlay/s6-rc.d/init-adduser/run + #!/usr/bin/with-contenv bash + # shellcheck shell=bash + + PUID=\${PUID:-911} + PGID=\${PGID:-911} + + groupmod -o -g "\$PGID" abc + usermod -o -u "\$PUID" abc + + echo " + ─────────────────────────────────────── + + ██╗ ███████╗██╗ ██████╗ + ██║ ██╔════╝██║██╔═══██╗ + ██║ ███████╗██║██║ ██║ + ██║ ╚════██║██║██║ ██║ + ███████╗███████║██║╚██████╔╝ + ╚══════╝╚══════╝╚═╝ ╚═════╝ + + Brought to you by linuxserver.io + ───────────────────────────────────────" + if [[ -f /donate.txt ]]; then + echo ' + To support the app dev(s) visit:' + cat /donate.txt + fi + echo ' + To support LSIO projects visit: + https://www.linuxserver.io/donate/ + + ─────────────────────────────────────── + GID/UID + ───────────────────────────────────────' + echo " + User UID: \$(id -u abc) + User GID: \$(id -g abc) + ─────────────────────────────────────── + " + + time32="\$(date +%Y)" + + if [[ "\${time32}" == "1970" || "\${time32}" == "1969" ]] && [ "\$(uname -m)" == "armv7l" ]; then + echo ' + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + + Your DockerHost is running an outdated version of libseccomp + + To fix this, please visit https://docs.linuxserver.io/faq#libseccomp + + Apps will not behave correctly without this + + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + ' + sleep infinity + fi + + lsiown abc:abc /app + lsiown abc:abc /config + lsiown abc:abc /defaults + + EOF + fi +} + # Run alias creation functions create_lsiown_alias create_with_contenv_alias @@ -317,5 +385,7 @@ if [[ -n "${DOCKER_MODS+x}" ]]; then run_mods fi +run_branding + # Set executable bit on legacy cont-init and services built into the image and anything legacy unpacked by mods set_legacy_executable_bits From bdfdc7aa7e799048153217cb17a7d46c5fb96ee0 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 25 Feb 2023 23:29:17 +0000 Subject: [PATCH 2/5] Fix logo spacing --- docker-mods.v3 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docker-mods.v3 b/docker-mods.v3 index 638ebc8..4bd372d 100755 --- a/docker-mods.v3 +++ b/docker-mods.v3 @@ -312,14 +312,14 @@ run_branding() { echo " ─────────────────────────────────────── - ██╗ ███████╗██╗ ██████╗ - ██║ ██╔════╝██║██╔═══██╗ - ██║ ███████╗██║██║ ██║ - ██║ ╚════██║██║██║ ██║ - ███████╗███████║██║╚██████╔╝ - ╚══════╝╚══════╝╚═╝ ╚═════╝ + ██╗ ███████╗██╗ ██████╗ + ██║ ██╔════╝██║██╔═══██╗ + ██║ ███████╗██║██║ ██║ + ██║ ╚════██║██║██║ ██║ + ███████╗███████║██║╚██████╔╝ + ╚══════╝╚══════╝╚═╝ ╚═════╝ - Brought to you by linuxserver.io + Brought to you by linuxserver.io ───────────────────────────────────────" if [[ -f /donate.txt ]]; then echo ' From 1ec916ce831dc67236937615fca5753696849faf Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 25 Feb 2023 23:32:59 +0000 Subject: [PATCH 3/5] Move conditional --- docker-mods.v3 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-mods.v3 b/docker-mods.v3 index 4bd372d..373125c 100755 --- a/docker-mods.v3 +++ b/docker-mods.v3 @@ -297,9 +297,8 @@ run_mods() { } run_branding() { - if [[ "${LSIO_FIRST_PARTY}" = "true" ]]; then - # intentional tabs in the heredoc - cat <<-EOF >/etc/s6-overlay/s6-rc.d/init-adduser/run + # intentional tabs in the heredoc + cat <<-EOF >/etc/s6-overlay/s6-rc.d/init-adduser/run #!/usr/bin/with-contenv bash # shellcheck shell=bash @@ -361,7 +360,6 @@ run_branding() { lsiown abc:abc /defaults EOF - fi } # Run alias creation functions @@ -385,7 +383,9 @@ if [[ -n "${DOCKER_MODS+x}" ]]; then run_mods fi -run_branding +if [[ "${LSIO_FIRST_PARTY}" = "true" ]]; then + run_branding +fi # Set executable bit on legacy cont-init and services built into the image and anything legacy unpacked by mods set_legacy_executable_bits From dc1605fbe8c1eabde5bb3ef08861c22003c5902c Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 26 Feb 2023 14:39:58 +0000 Subject: [PATCH 4/5] Reformat seccomp warning --- docker-mods.v3 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-mods.v3 b/docker-mods.v3 index 373125c..ba58442 100755 --- a/docker-mods.v3 +++ b/docker-mods.v3 @@ -342,15 +342,15 @@ run_branding() { if [[ "\${time32}" == "1970" || "\${time32}" == "1969" ]] && [ "\$(uname -m)" == "armv7l" ]; then echo ' - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - - Your DockerHost is running an outdated version of libseccomp - - To fix this, please visit https://docs.linuxserver.io/faq#libseccomp - - Apps will not behave correctly without this - - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + ╔═════════════════════════════════════════════════════════════════════════════╗ + ║ ║ + ║ Your Docker Host is running an outdated version of libseccomp ║ + ║ ║ + ║ To fix this, please visit https://docs.linuxserver.io/faq#libseccomp ║ + ║ ║ + ║ Apps will not behave correctly without this ║ + ║ ║ + ╚═════════════════════════════════════════════════════════════════════════════╝ ' sleep infinity fi From a95e92be74fae6803f474886841f50d9152b3721 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sun, 26 Feb 2023 16:20:18 +0000 Subject: [PATCH 5/5] Tiny spacing change --- docker-mods.v3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-mods.v3 b/docker-mods.v3 index ba58442..77f068b 100755 --- a/docker-mods.v3 +++ b/docker-mods.v3 @@ -318,7 +318,7 @@ run_branding() { ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ - Brought to you by linuxserver.io + Brought to you by linuxserver.io ───────────────────────────────────────" if [[ -f /donate.txt ]]; then echo '