diff --git a/distributions/LEIoT/options b/distributions/LEIoT/options index 11218ce958..8221c23829 100644 --- a/distributions/LEIoT/options +++ b/distributions/LEIoT/options @@ -94,6 +94,9 @@ # local console login prompt (yes / no) LOCAL_LOGIN="yes" +# Enable SSH on boot (yes / no) + SSH_ENABLED_DEFAULT="yes" + ### KODI SETTINGS ### # Mediacenter to use (kodi / no) MEDIACENTER="no" diff --git a/distributions/LibreELEC/options b/distributions/LibreELEC/options index 6fb122e338..f01cbd74d3 100644 --- a/distributions/LibreELEC/options +++ b/distributions/LibreELEC/options @@ -94,6 +94,9 @@ # local console login prompt (yes / no) LOCAL_LOGIN="no" +# Enable SSH on boot (yes / no) + SSH_ENABLED_DEFAULT="no" + ### KODI SETTINGS ### # Mediacenter to use (kodi / no) MEDIACENTER="kodi" diff --git a/packages/network/openssh/package.mk b/packages/network/openssh/package.mk index a7f1c0b3ca..fe33245d2a 100644 --- a/packages/network/openssh/package.mk +++ b/packages/network/openssh/package.mk @@ -55,5 +55,8 @@ post_makeinstall_target() { } post_install() { + if [ "${SSH_ENABLED_DEFAULT}" = "yes" ]; then + sed -e "\|^Condition.*|d" -i ${INSTALL}/usr/lib/systemd/system/sshd.service + fi enable_service sshd.service }