mirror of
https://github.com/YunoHost-Apps/borgserver_ynh.git
synced 2024-09-03 20:36:20 +02:00
commit
a6d63d0ec7
3 changed files with 6 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
|||
"en": "Offer backup storage to a friend.",
|
||||
"fr": "Offrez un espace de stockage à un⋅e ami⋅e."
|
||||
},
|
||||
"version": "1.1.16~ynh2",
|
||||
"version": "1.1.16~ynh3",
|
||||
"url": "https://borgbackup.readthedocs.io",
|
||||
"license": "BSD-3-Clause",
|
||||
"maintainer": {
|
||||
|
|
|
@ -17,6 +17,7 @@ install_borg_with_pip () {
|
|||
if [ ! -d /opt/borg-env ]; then
|
||||
python3 -m venv /opt/borg-env
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/pip install wheel
|
||||
ynh_print_info --message="Installing/compiling borg, this may take some time..."
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup[fuse]==$BORG_VERSION
|
||||
echo "#!/bin/bash
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
|
||||
|
|
|
@ -54,8 +54,11 @@ if [ -f "/etc/yunohost/hooks.d/backup/17-data_home" ]; then
|
|||
ynh_secure_remove /etc/yunohost/hooks.d/backup/17-data_home
|
||||
fi
|
||||
|
||||
# Fix broken value ssh_user that mistakenly got replaced by the public key in previous versions...
|
||||
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_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 :( !"
|
||||
ynh_app_setting_set --app=$app --key=ssh_user --value="$ssh_user"
|
||||
fi
|
||||
|
||||
if echo "$public_key" | grep -q -v ' '; then
|
||||
|
|
Loading…
Add table
Reference in a new issue