Files
addons/ssh/rootfs/etc/services.d/sshd/run
Pascal Vizeli 7639eef0e7 Show information/warning if the SSH port is disable (#1156)
* Show information/warning if the SSH port is disable

* Update config.json

* Update CHANGELOG.md
2020-03-01 14:42:31 +01:00

14 lines
509 B
Plaintext

#!/usr/bin/with-contenv bashio
# ==============================================================================
# Start sshd service if enabled
# ==============================================================================
# If SSH is disabled, use a fake sleep process
if ! bashio::var.has_value "$(bashio::addon.port 22)"; then
bashio::log.warning "SSH port is disabled. Prevent start of SSH server."
exec sleep 864000
fi
bashio::log.info "Starting the SSH daemon..."
exec /usr/sbin/sshd -D -e