fix(package): `sentinèlla unset error

This commit is contained in:
2025-10-07 04:02:49 +00:00
parent 76e09ce5c3
commit d446b24c47
2 changed files with 14 additions and 4 deletions

View File

@@ -96,8 +96,8 @@ base64() {
esac esac
} }
TIMEOUT=${TIMEOUT:-5} : "${TIMEOUT:=5}"
[ -n "$VOLUMES" ] || VOLUMES=$(df -P | awk 'NR>1{print $6}') : "${VOLUMES:=$(df -P | awk 'NR>1{print $6}')}"
route_status() { route_status() {
if [ -z "$URLS" ]; then if [ -z "$URLS" ]; then
@@ -138,7 +138,7 @@ route_disk() {
} }
AUTH_TOKENS="" 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 while IFS= read -r up || [ -n "$up" ]; do
[ -n "$up" ] || continue [ -n "$up" ] || continue
AUTH_TOKENS="$AUTH_TOKENS $(base64 encode "$up" | tail -n1)" AUTH_TOKENS="$AUTH_TOKENS $(base64 encode "$up" | tail -n1)"

View File

@@ -1,6 +1,16 @@
#!/usr/bin/env dash #!/usr/bin/env dash
#
#
#
#
#
#
#
#
set -euo pipefail set -euo pipefail
socat -V >/dev/null socat -V >/dev/null
dash -c 'echo ok' >/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"