Optimise and fix s6

pull/142/head
modem7 2024-04-25 07:23:30 +01:00
rodzic 37d5e7f819
commit fa9bec5e5e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 2C37853D96B6D9E9
10 zmienionych plików z 16 dodań i 33 usunięć

Wyświetl plik

@ -0,0 +1 @@
# This file doesn't do anything, it's just the end of the downstream image init process

Wyświetl plik

@ -1,14 +1,17 @@
#!/usr/bin/with-contenv bash
#!/command/with-contenv bash
# Install DockerCLI if true
if [ "${DOCKERCLI}" == "true" ]; then
echo "[custom-init] Installing Docker CLI and Compose..."
echo "[custom-init] Installing Docker CLI and Docker Compose..."
apk add -U --quiet docker-cli docker-cli-compose
else
echo "[custom-init] Docker CLI variable not set, skipping..."
fi
# Install additional packages
if [ -v EXTRA_PKGS ]
then
echo "[custom-init] Installing extra packages: $EXTRA_PKGS"
apk add -U --quiet $EXTRA_PKGS
fi
if [ -v EXTRA_PKGS ]; then
echo "[custom-init] Installing extra packages: $EXTRA_PKGS"
apk add -U --quiet $EXTRA_PKGS
else
echo "[custom-init] No custom packages found, skipping..."
fi

Wyświetl plik

@ -1,21 +0,0 @@
#!/usr/bin/with-contenv bash
# Directories
SCRIPTS_DIR="/custom-cont-init.d"
# Make sure custom init directory exists and has files in it
if [[ -e "${SCRIPTS_DIR}" ]] && [[ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]]; then
echo "[custom-init] Files found, executing"
for SCRIPT in "${SCRIPTS_DIR}"/*; do
NAME="$(basename "${SCRIPT}")"
if [[ -f "${SCRIPT}" ]]; then
echo "[custom-init] ${NAME}: executing..."
/bin/bash "${SCRIPT}"
echo "[custom-init] ${NAME}: exited $?"
elif [[ ! -f "${SCRIPT}" ]]; then
echo "[custom-init] ${NAME}: is not a file"
fi
done
else
echo "[custom-init] No custom files found, skipping..."
fi

Wyświetl plik

@ -1 +0,0 @@
/etc/s6-overlay/s6-rc.d/init-custom-scripts/run

Wyświetl plik

@ -1,4 +1,4 @@
#!/bin/bash
#!/command/with-contenv bash
if test "$1" -eq 256 ; then
e=$((128 + $2))
@ -7,4 +7,4 @@ else
fi
echo "Received exit code $e."
echo "$e" > /run/s6-linux-init-container-results/exitcode
echo "$e" > /run/s6-linux-init-container-results/exitcode

Wyświetl plik

@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bash
#!/command/with-contenv bash
# Version variables
borgver=$(borg --version)
@ -15,6 +15,7 @@ else
fi
# Software versions
echo "-----------------------------------"
echo "Software Versions:
-----------------------------------
apprise $apprisever
@ -118,4 +119,4 @@ crontab=$(crontab -l)
echo -e "Cron job set as: \n$crontab\n"
# Start Cron
exec /usr/sbin/crond -f -L /dev/stdout
exec /usr/sbin/crond -f -L /dev/stdout