mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-03-23 00:05:28 +08:00
Merge pull request #592 from linuxserver/mods-script-branding
This commit is contained in:
commit
5821afeedd
@ -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.
|
||||
|
||||
@ -296,6 +296,72 @@ run_mods() {
|
||||
done
|
||||
}
|
||||
|
||||
run_branding() {
|
||||
# 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 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
|
||||
|
||||
lsiown abc:abc /app
|
||||
lsiown abc:abc /config
|
||||
lsiown abc:abc /defaults
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# Run alias creation functions
|
||||
create_lsiown_alias
|
||||
create_with_contenv_alias
|
||||
@ -317,5 +383,9 @@ if [[ -n "${DOCKER_MODS+x}" ]]; then
|
||||
run_mods
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user