From c321d5990362fa8757122865e198205f2c4750a3 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 8 Apr 2021 20:14:59 +0200 Subject: [PATCH 1/3] [fix] Missing repo name in email --- conf/backup-with-borg | 3 ++- manifest.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/backup-with-borg b/conf/backup-with-borg index f153033..883e3ec 100644 --- a/conf/backup-with-borg +++ b/conf/backup-with-borg @@ -72,10 +72,11 @@ fi # Send mail on backup (partially) failed domain=$(hostname) +repository="$(sudo yunohost app setting ${borg_id} repository)" if [ ! -z "$errors" ]; then cat <(echo -e "$errors\n\n\n") "$log_file" "$err_file" | mail -s "[borg] Backup failed from $domain onto $repo" root exit 1 else - cat $log_file | mail -s "[borg] Backup succeed from $domain onto $repo" root + cat $log_file | mail -s "[borg] Backup succeed from $domain onto $repository" root exit 0 fi diff --git a/manifest.json b/manifest.json index 5744207..211c2c5 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.16~ynh16", + "version": "1.1.16~ynh17", "url": "https://borgbackup.readthedocs.io", "license": "BSD-3-Clause", "maintainer": { From 612bfbd2da2cb7c4e933e42bfa10ea88de893cf4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 11 Apr 2021 18:56:54 +0200 Subject: [PATCH 2/3] Add comment that installation may take some time because it requires local compilation (at least on ARM board) --- scripts/_common.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 90945f3..8c53ce9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -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 From 848369ad1edf5fe9780067b861da09d0a4b1d59a Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Sun, 11 Apr 2021 19:17:38 +0200 Subject: [PATCH 3/3] [fix] Unknown var --- conf/backup-with-borg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/backup-with-borg b/conf/backup-with-borg index 883e3ec..4d9bc7e 100644 --- a/conf/backup-with-borg +++ b/conf/backup-with-borg @@ -74,7 +74,7 @@ fi domain=$(hostname) repository="$(sudo yunohost app setting ${borg_id} repository)" if [ ! -z "$errors" ]; then - cat <(echo -e "$errors\n\n\n") "$log_file" "$err_file" | mail -s "[borg] Backup failed from $domain onto $repo" root + cat <(echo -e "$errors\n\n\n") "$log_file" "$err_file" | mail -s "[borg] Backup failed from $domain onto $repository" root exit 1 else cat $log_file | mail -s "[borg] Backup succeed from $domain onto $repository" root