mirror of
https://github.com/hassio-addons/addon-base.git
synced 2025-05-07 04:11:24 +00:00
Upgrade s6-overlay from 2.2.0.3 to 3.1.0.1 (#176)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
23641750a0
commit
113f723c02
5 changed files with 23 additions and 28 deletions
|
@ -9,6 +9,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
|
||||
|
@ -24,6 +25,7 @@ RUN \
|
|||
\
|
||||
&& apk add --no-cache --virtual .build-dependencies \
|
||||
tar=1.34-r0 \
|
||||
xz=5.2.5-r1 \
|
||||
\
|
||||
&& apk add --no-cache \
|
||||
libcrypto1.1=1.1.1o-r0 \
|
||||
|
@ -37,12 +39,23 @@ RUN \
|
|||
jq=1.6-r1 \
|
||||
tzdata=2022a-r0 \
|
||||
\
|
||||
&& 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}" = "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 -s "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 \
|
||||
|
|
|
@ -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