From 7b0105338f84d5636562498a70ee24d6c4a73ec2 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 11 Apr 2021 19:25:54 +0200 Subject: [PATCH] Also check during upgrade that ssh user ain't empty to avoid catastrophies --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 902b165..fa5d421 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -55,6 +55,7 @@ if [ -f "/etc/yunohost/hooks.d/backup/17-data_home" ]; then fi # Fix broken value ssh_user that mistakenly got replaced by the public key in previous versions... +[ -n "$ssh_user" ] || ynh_die "Unable to retrieve ssh_user please fix /etc/yunohost/apps/$app/settings.yml manually :( !" if echo "$ssh_user" | grep -q ' '; then ssh_user=$(grep "$ssh_user" /home/*/.ssh/authorized_keys | grep borg | cut -d/ -f3) [ -n "$ssh_user" ] || ynh_die "Unable to retrieve ssh_user please fix /etc/yunohost/apps/$app/settings.yml manually :( !"