joininbox/scripts/_bootstrap.sh
openoms 7c5c95ffd7
add bootstrap.service for standalone builds (#23)
* build: add bootsrap.service for standalone run

* FAQ: build the SDcard image

* fix file permissions in git
2021-02-10 11:59:59 +00:00

15 lines
No EOL
460 B
Bash
Executable file

#!/bin/bash
# based on https://github.com/rootzoll/raspiblitz/blob/v1.6/home.admin/_bootstrap.sh
# used when running standalone
################################
# GENERATE UNIQUE SSH PUB KEYS
# on first boot up
################################
numberOfPubKeys=$(sudo ls /etc/ssh/ | grep -c 'ssh_host_')
if [ ${numberOfPubKeys} -eq 0 ]; then
echo "*** Generating new SSH PubKeys" >> $logFile
sudo dpkg-reconfigure openssh-server
echo "OK" >> $logFile
fi