1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borg_ynh.git synced 2024-09-03 18:16:05 +02:00

Merge pull request #76 from YunoHost-Apps/testing

Testing
This commit is contained in:
ljf (zamentur) 2021-04-11 19:18:02 +02:00 committed by GitHub
commit 27b2e71b7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -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
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 $repo" root
cat $log_file | mail -s "[borg] Backup succeed from $domain onto $repository" root
exit 0
fi

View file

@ -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": {

View file

@ -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