mirror of
https://github.com/hassio-addons/addon-debian-base.git
synced 2025-05-06 20:21:24 +00:00
⬆️ Upgrade s6-overlay from 2.2.0.3 to 3.1.0.1 (#111)
This commit is contained in:
parent
47c34f4fa7
commit
0b2e711a42
5 changed files with 26 additions and 29 deletions
|
@ -10,6 +10,7 @@ ENV \
|
|||
PS1="$(whoami)@$(hostname):$(pwd)$ " \
|
||||
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
|
||||
S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
TERM="xterm-256color"
|
||||
|
||||
# Copy root filesystem
|
||||
|
@ -29,16 +30,27 @@ RUN \
|
|||
curl=7.74.0-1.3+deb11u1 \
|
||||
jq=1.6-2.1 \
|
||||
tzdata=2021a-1+deb11u3 \
|
||||
xz-utils=5.2.5-2 \
|
||||
\
|
||||
&& c_rehash \
|
||||
\
|
||||
&& S6_VERSION="3.1.0.1" \
|
||||
&& S6_ARCH="${BUILD_ARCH}" \
|
||||
&& if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="x86"; fi \
|
||||
&& if [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
|
||||
&& if [ "${BUILD_ARCH}" = "armhf" ]; then S6_ARCH="armhf"; fi \
|
||||
&& if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="i686"; \
|
||||
elif [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \
|
||||
elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
|
||||
\
|
||||
&& curl -L "https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${S6_ARCH}.tar.gz" \
|
||||
| tar zxvf - -C / \
|
||||
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-noarch.tar.xz" \
|
||||
| tar -C / -Jxpf - \
|
||||
\
|
||||
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" \
|
||||
| tar -C / -Jxpf - \
|
||||
\
|
||||
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-symlinks-noarch.tar.xz" \
|
||||
| tar -C / -Jxpf - \
|
||||
\
|
||||
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-symlinks-arch.tar.xz" \
|
||||
| tar -C / -Jxpf - \
|
||||
\
|
||||
&& mkdir -p /etc/fix-attrs.d \
|
||||
&& mkdir -p /etc/services.d \
|
||||
|
@ -57,6 +69,9 @@ RUN \
|
|||
"https://github.com/home-assistant/tempio/releases/download/2021.09.0/tempio_${BUILD_ARCH}" \
|
||||
&& chmod a+x /usr/bin/tempio \
|
||||
\
|
||||
&& apt-get purge -y --auto-remove \
|
||||
xz-utils \
|
||||
&& apt-get clean \
|
||||
&& rm -fr \
|
||||
/tmp/* \
|
||||
/var/{cache,log}/* \
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Base Images
|
||||
# Displays an message right before terminating in case something went wrong
|
||||
# ==============================================================================
|
||||
if [[ "${S6_STAGE2_EXITED}" -ne 0 ]]; then
|
||||
bashio::log.red \
|
||||
'-----------------------------------------------------------'
|
||||
bashio::log.red ' Oops! Something went wrong.'
|
||||
bashio::log.red
|
||||
bashio::log.red ' We are so sorry, but something went terribly wrong when'
|
||||
bashio::log.red ' starting or running this add-on.'
|
||||
bashio::log.red ' '
|
||||
bashio::log.red ' Be sure to check the log above, line by line, for hints.'
|
||||
bashio::log.red \
|
||||
'-----------------------------------------------------------'
|
||||
fi
|
2
base/rootfs/etc/cont-init.d/00-banner.sh
Normal file → Executable file
2
base/rootfs/etc/cont-init.d/00-banner.sh
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/with-contenv bashio
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Base Images
|
||||
# Displays a simple add-on banner on startup
|
||||
|
|
2
base/rootfs/etc/cont-init.d/01-log-level.sh
Normal file → Executable file
2
base/rootfs/etc/cont-init.d/01-log-level.sh
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/with-contenv bashio
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Base Images
|
||||
# Sets the log level correctly
|
||||
|
|
|
@ -2,15 +2,14 @@
|
|||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Base Images
|
||||
# This script patches all service commands into the appropriate s6- commands
|
||||
# Why not systemd? Docker said no, so did we ;)
|
||||
# ==============================================================================
|
||||
|
||||
start() {
|
||||
s6-svc -wU -u -T2500 "/var/run/s6/services/${service}"
|
||||
s6-svc -wU -u -T2500 "/run/service/${service}"
|
||||
}
|
||||
|
||||
stop() {
|
||||
s6-svc -wD -d -T2500 "/var/run/s6/services/${service}"
|
||||
s6-svc -wD -d -T2500 "/run/service/${service}"
|
||||
}
|
||||
|
||||
restart() {
|
||||
|
@ -19,13 +18,13 @@ restart() {
|
|||
}
|
||||
|
||||
status() {
|
||||
s6-svstat "/var/run/s6/services/${service}"
|
||||
s6-svstat "/run/service/${service}"
|
||||
}
|
||||
|
||||
service="$1"
|
||||
command="$2"
|
||||
|
||||
if [[ ! -d "/var/run/s6/services/${service}" ]] ; then
|
||||
if [[ ! -d "/run/service/${service}" ]] ; then
|
||||
echo "s6 service not found for ${service}, exiting..."
|
||||
exit
|
||||
fi;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue