diff --git a/manifest.json b/manifest.json index 7ee5f85..8517205 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Backup your server on a host server using Borg.", "fr": "Sauvegardez votre serveur sur un serveur distant avec Borg." }, - "version": "1.1.10~ynh5", + "version": "1.1.10~ynh6", "url": "https://borgbackup.readthedocs.io", "license": "BSD-3-Clause", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 21c15e5..f8e32bd 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -206,6 +206,15 @@ ynh_debian_release () { lsb_release --codename --short } +is_buster () { + if [ "$(ynh_debian_release)" == "buster" ] + then + return 0 + else + return 1 + fi +} + is_stretch () { if [ "$(ynh_debian_release)" == "stretch" ] then diff --git a/scripts/upgrade b/scripts/upgrade index 3401b3b..139e4ee 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -57,10 +57,14 @@ if grep "borg.timer" /etc/yunohost/services.yml > /dev/null ; then fi # Replace backports with pip -if is_stretch; then +if is_buster; then + if [ ! -f /opt/borg-env/buster ] ; then rm -f /etc/apt/sources.list.d/$app-stretch-backports.list - + ynh_secure_remove /opt/borg-env install_borg_with_pip + touch /opt/borg-env/buster + fi + fi #=================================================