This commit is contained in:
ai-dev
2025-10-11 12:14:55 +02:00
parent 0085404253
commit e8681cdead
93 changed files with 3680 additions and 671 deletions

View File

@@ -1,27 +1,10 @@
#!/command/with-contenv bashio
# vim: ft=bash
# shellcheck shell=bash
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Take down the S6 supervision tree when nmbd fails
# Take down the S6 supervision tree based on service exit code
# ==============================================================================
# shellcheck disable=SC2155
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
readonly exit_code_service="${1}"
readonly exit_code_signal="${2}"
readonly service="nmbd"
bashio::log.info \
"Service ${service} exited with code ${exit_code_service}" \
"(by signal ${exit_code_signal})"
if [[ "${exit_code_service}" -eq 256 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo $((128 + exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
fi
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
elif [[ "${exit_code_service}" -ne 0 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
fi
if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then
bashio::log.warning "nmbd crashed, halting add-on"
exec /run/s6/basedir/bin/halt
fi
bashio::log.info "nmbd stopped"

View File

@@ -1,10 +1,8 @@
#!/command/with-contenv bashio
# vim: ft=bash
# shellcheck shell=bash
#!/usr/bin/env bash
# ==============================================================================
# Start nmbd service
# ==============================================================================
exec nmbd \
--foreground \
--debug-stdout \
--no-process-group
--no-process-group

View File

@@ -1 +1 @@
longrun
longrun