mirror of
https://github.com/YunoHost-Apps/borgserver_ynh.git
synced 2024-09-03 20:36:20 +02:00
Also check during upgrade that ssh user ain't empty to avoid catastrophies
This commit is contained in:
parent
96383b7787
commit
7b0105338f
1 changed files with 1 additions and 0 deletions
|
@ -55,6 +55,7 @@ if [ -f "/etc/yunohost/hooks.d/backup/17-data_home" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fix broken value ssh_user that mistakenly got replaced by the public key in previous versions...
|
# 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
|
if echo "$ssh_user" | grep -q ' '; then
|
||||||
ssh_user=$(grep "$ssh_user" /home/*/.ssh/authorized_keys | grep borg | cut -d/ -f3)
|
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 :( !"
|
[ -n "$ssh_user" ] || ynh_die "Unable to retrieve ssh_user please fix /etc/yunohost/apps/$app/settings.yml manually :( !"
|
||||||
|
|
Loading…
Add table
Reference in a new issue