mirror of
https://github.com/YunoHost-Apps/borg_ynh.git
synced 2024-09-03 18:16:05 +02:00
commit
27b2e71b7b
3 changed files with 5 additions and 3 deletions
|
|
@ -72,10 +72,11 @@ fi
|
||||||
|
|
||||||
# Send mail on backup (partially) failed
|
# Send mail on backup (partially) failed
|
||||||
domain=$(hostname)
|
domain=$(hostname)
|
||||||
|
repository="$(sudo yunohost app setting ${borg_id} repository)"
|
||||||
if [ ! -z "$errors" ]; then
|
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
|
exit 1
|
||||||
else
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Backup your server on a host server using Borg.",
|
"en": "Backup your server on a host server using Borg.",
|
||||||
"fr": "Sauvegardez votre serveur sur un serveur distant avec 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",
|
"url": "https://borgbackup.readthedocs.io",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ install_borg_with_pip () {
|
||||||
if [ ! -d /opt/borg-env ]; then
|
if [ ! -d /opt/borg-env ]; then
|
||||||
python3 -m venv /opt/borg-env
|
python3 -m venv /opt/borg-env
|
||||||
/opt/borg-env/bin/python /opt/borg-env/bin/pip install wheel
|
/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
|
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup[fuse]==$BORG_VERSION
|
||||||
echo "#!/bin/bash
|
echo "#!/bin/bash
|
||||||
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
|
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue