From cc80265997f973d92541ceb48613a6810c1c39b0 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 25 Jun 2018 08:55:16 +0200 Subject: [PATCH] Run dropbear only if they have a known_hosts --- buildroot-external/rootfs-overlay/usr/sbin/hassos-config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildroot-external/rootfs-overlay/usr/sbin/hassos-config b/buildroot-external/rootfs-overlay/usr/sbin/hassos-config index 7b5bdd3ce..f274ad72e 100755 --- a/buildroot-external/rootfs-overlay/usr/sbin/hassos-config +++ b/buildroot-external/rootfs-overlay/usr/sbin/hassos-config @@ -37,6 +37,11 @@ if [ -f /mnt/config/known_hosts ]; then cp -f /mnt/config/known_hosts /root/.ssh/known_hosts chmod 600 /root/.ssh/known_hosts + + systemctl start dropbear +else + rm -f /root/.ssh/known_hosts + systemctl stop dropbear fi ##