mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
#2938 improve detect old ssh data
This commit is contained in:
parent
f5fe9968eb
commit
6bb8f11b2d
1 changed files with 2 additions and 1 deletions
|
@ -241,7 +241,8 @@ if [ "$1" = "status" ]; then
|
|||
cp -a /mnt/hdd${subVolumeDir}/app-data/wpa_supplicant.conf /var/cache/raspiblitz/hdd-inspect/wpa_supplicant.conf 2>/dev/null
|
||||
|
||||
# Convert old ssh backup data structure (if needed)
|
||||
if [ -d "/mnt/hdd/ssh" ]; then
|
||||
oldDataExists=$(sudo ls /mnt/hdd/ssh/ssh_host_rsa_key 2>/dev/null | grep -c "ssh_host_rsa_key")
|
||||
if [ "${oldDataExists}" != "0" ]; then
|
||||
# make a complete backup of directory
|
||||
cp -a /mnt/hdd/ssh /mnt/hdd/app-storage/ssh-old-backup
|
||||
# delete old false sub directory (if exists)
|
||||
|
|
Loading…
Add table
Reference in a new issue