mirror of
https://github.com/YunoHost-Apps/borgserver_ynh.git
synced 2024-09-03 20:36:20 +02:00
Actually fix broken $ssh_user value during upgrade..
This commit is contained in:
parent
593514a128
commit
712660cd62
1 changed files with 3 additions and 1 deletions
|
@ -54,8 +54,10 @@ if [ -f "/etc/yunohost/hooks.d/backup/17-data_home" ]; then
|
||||||
ynh_secure_remove /etc/yunohost/hooks.d/backup/17-data_home
|
ynh_secure_remove /etc/yunohost/hooks.d/backup/17-data_home
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fix broken value ssh_user that mistakenly got replaced by the public key in previous versions...
|
||||||
if echo "$ssh_user" | grep -q ' '; then
|
if echo "$ssh_user" | grep -q ' '; then
|
||||||
ynh_app_setting_set --app=$app --key=ssh_user --value="$(grep "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIadutuK2" /home/*/.ssh/authorized_keys | grep borg | cut -d/ -f3)"
|
ssh_user=$(grep "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIadutuK2" /home/*/.ssh/authorized_keys | grep borg | cut -d/ -f3)
|
||||||
|
ynh_app_setting_set --app=$app --key=ssh_user --value="$ssh_user"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if echo "$public_key" | grep -q -v ' '; then
|
if echo "$public_key" | grep -q -v ' '; then
|
||||||
|
|
Loading…
Reference in a new issue