13 lines
504 B
Plaintext
13 lines
504 B
Plaintext
#!/usr/bin/with-contenv bashio
|
|
# ==============================================================================
|
|
# Take down the S6 supervision tree based on service exit code
|
|
# ==============================================================================
|
|
if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then
|
|
bashio::log.warning "smbd crashed, halting add-on"
|
|
bashio::log.info "Dump SMB configuration:"
|
|
cat /etc/samba/smb.conf >&2
|
|
exec /run/s6/basedir/bin/halt
|
|
fi
|
|
|
|
bashio::log.info "smbd stopped"
|