summaryrefslogtreecommitdiff
path: root/stretch-armhf-blend/customization/includes.chroot/etc/rc.local
diff options
context:
space:
mode:
Diffstat (limited to 'stretch-armhf-blend/customization/includes.chroot/etc/rc.local')
-rwxr-xr-xstretch-armhf-blend/customization/includes.chroot/etc/rc.local8
1 files changed, 7 insertions, 1 deletions
diff --git a/stretch-armhf-blend/customization/includes.chroot/etc/rc.local b/stretch-armhf-blend/customization/includes.chroot/etc/rc.local
index bedc8cf..4e613ff 100755
--- a/stretch-armhf-blend/customization/includes.chroot/etc/rc.local
+++ b/stretch-armhf-blend/customization/includes.chroot/etc/rc.local
@@ -11,7 +11,13 @@
#
# By default this script does nothing.
+
# Generate the SSH keys if non-existent
-test -f /etc/ssh/ssh_host_rsa_key || dpkg-reconfigure openssh-server
+if [ ! -f /etc/ssh/ssh_host_rsa_key ]
+then
+ # else ssh service start in dpkg-reconfigure will fail
+ systemctl stop ssh.socket||true
+ dpkg-reconfigure openssh-server
+fi
exit 0