From d7e782f460b9213ee0f442715687392295bbe0ac Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 11 Jan 2026 17:35:05 +0100 Subject: [PATCH] Update 91-secrets.sh --- karakeep/rootfs/etc/cont-init.d/91-secrets.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/karakeep/rootfs/etc/cont-init.d/91-secrets.sh b/karakeep/rootfs/etc/cont-init.d/91-secrets.sh index 2af5e269a..b22cfd2e7 100755 --- a/karakeep/rootfs/etc/cont-init.d/91-secrets.sh +++ b/karakeep/rootfs/etc/cont-init.d/91-secrets.sh @@ -1,9 +1,13 @@ -#!/command/with-contenv bashio +#!/usr/bin/with-contenv bashio # shellcheck shell=bash set -e generate_secret() { - tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 64 + # Avoid SIGPIPE from `tr` when `head` terminates early under pipefail. + ( + set +o pipefail 2>/dev/null || true + tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 64 + ) } set_option() {