mirror of
https://github.com/YunoHost-Apps/borg_ynh.git
synced 2024-09-03 18:16:05 +02:00
[enh] Pin the borg version to 1.1.10
This commit is contained in:
parent
9ffad7b376
commit
3b26798171
4 changed files with 15 additions and 24 deletions
|
@ -8,6 +8,18 @@ PKG_DIR=$(cd ../; pwd)
|
|||
|
||||
pkg_dependencies="python3-pip python3-dev libacl1-dev libssl-dev liblz4-dev python3-jinja2 python3-setuptools python-virtualenv"
|
||||
|
||||
# Install borg with pip if borg is not here
|
||||
install_borg_with_pip () {
|
||||
if [ ! -d /opt/borg-env ]; then
|
||||
virtualenv --python=python3 /opt/borg-env
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup=1.1.10
|
||||
echo "#!/bin/bash
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
|
||||
chmod u+x /usr/local/bin/borg
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#=================================================
|
||||
# COMMON HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -33,14 +33,7 @@ ynh_save_args server ssh_user passphrase on_calendar conf data apps
|
|||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
if [ ! -d /opt/borg-env ]; then
|
||||
virtualenv --python=python3 /opt/borg-env
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup
|
||||
echo "#!/bin/bash
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
|
||||
chmod u+x /usr/local/bin/borg
|
||||
fi
|
||||
install_borg_with_pip
|
||||
|
||||
#=================================================
|
||||
# ACTIVATE BACKUP METHODS
|
||||
|
|
|
@ -34,15 +34,7 @@ ssh_user=$(ynh_app_setting_get $app ssh_user)
|
|||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
if [ ! -d /opt/borg-env ]; then
|
||||
virtualenv --python=python3 /opt/borg-env
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup
|
||||
echo "#!/bin/bash
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
|
||||
chmod u+x /usr/local/bin/borg
|
||||
fi
|
||||
|
||||
install_borg_with_pip
|
||||
|
||||
#=================================================
|
||||
# ACTIVATE BACKUP METHODS
|
||||
|
|
|
@ -44,11 +44,5 @@ fi
|
|||
if is_stretch; then
|
||||
ynh_remove_backports
|
||||
|
||||
if [ ! -d /opt/borg-env ]; then
|
||||
virtualenv --python=python3 /opt/borg-env
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup
|
||||
echo "#!/bin/bash
|
||||
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
|
||||
chmod u+x /usr/local/bin/borg
|
||||
fi
|
||||
install_borg_with_pip
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue