From d446b24c47013e6cdb0ea9fadb54f45801c21975 Mon Sep 17 00:00:00 2001 From: yukkop Date: Tue, 7 Oct 2025 04:02:49 +0000 Subject: [PATCH] =?UTF-8?q?fix(package):=20`sentin=C3=A8lla=20unset=20erro?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/sentinèlla/probe-loop.sh | 6 +++--- package/sentinèlla/probe.sh | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/package/sentinèlla/probe-loop.sh b/package/sentinèlla/probe-loop.sh index cbb6a7f..e8baab4 100644 --- a/package/sentinèlla/probe-loop.sh +++ b/package/sentinèlla/probe-loop.sh @@ -96,8 +96,8 @@ base64() { esac } -TIMEOUT=${TIMEOUT:-5} -[ -n "$VOLUMES" ] || VOLUMES=$(df -P | awk 'NR>1{print $6}') +: "${TIMEOUT:=5}" +: "${VOLUMES:=$(df -P | awk 'NR>1{print $6}')}" route_status() { if [ -z "$URLS" ]; then @@ -138,7 +138,7 @@ route_disk() { } AUTH_TOKENS="" -if [ -n "$AUTH_FILE" ] && [ -r "$AUTH_FILE" ]; then +if [ -n "${AUTH_FILE:-}" ] && [ -r "$AUTH_FILE" ]; then while IFS= read -r up || [ -n "$up" ]; do [ -n "$up" ] || continue AUTH_TOKENS="$AUTH_TOKENS $(base64 encode "$up" | tail -n1)" diff --git a/package/sentinèlla/probe.sh b/package/sentinèlla/probe.sh index 4d4addc..ffeb0d1 100644 --- a/package/sentinèlla/probe.sh +++ b/package/sentinèlla/probe.sh @@ -1,6 +1,16 @@ #!/usr/bin/env dash + +# +# +# +# +# +# +# +# + set -euo pipefail socat -V >/dev/null dash -c 'echo ok' >/dev/null -socat -T5 -t5 TCP-LISTEN:"${PORT:-5988}",reuseaddr,fork EXEC:"dash ${LOOP_FILE:-probe-loop}" +socat -T5 -t5 TCP-LISTEN:"${PORT:-5988}",reuseaddr,fork EXEC:"probe-loop"