move ssh repair up

This commit is contained in:
rootzoll 2021-08-20 00:38:28 +02:00
parent 38cc41f069
commit 4b439f2379

View file

@ -94,6 +94,11 @@ sudo chmod 777 ${infoFile}
######################################
# CHECK SD CARD INCONSISTENT STATE
# make sure SSH server certs are configured & sshd is running
sudo systemctl stop sshd
sudo dpkg-reconfigure openssh-server
sudo systemctl start sshd
# when the provision did not ran thru without error (ask user for fresh sd card)
provisionFlagExists=$(sudo ls /home/admin/provision.flag | grep -c 'provision.flag')
if [ "${provisionFlagExists}" == "1" ]; then
@ -105,11 +110,6 @@ if [ "${provisionFlagExists}" == "1" ]; then
exit 1
fi
# make sure SSH server certs are configured & sshd is running
sudo systemctl stop sshd
sudo dpkg-reconfigure openssh-server
sudo systemctl start sshd
######################################
# SECTION FOR POSSIBLE REBOOT ACTIONS
systemInitReboot=0