1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borgserver_ynh.git synced 2024-09-03 20:36:20 +02:00
This commit is contained in:
Salamandar 2024-08-25 14:44:39 +02:00 committed by GitHub
commit 75530d31b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 18 additions and 17 deletions

View file

@ -21,7 +21,7 @@ Setup a storage space to be used for backup using Borg
This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine. This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine.
**Shipped version:** 1.2.8~ynh5 **Shipped version:** 1.4.0~ynh1
## Documentation and resources ## Documentation and resources
- Official app website: <https://www.borgbackup.org/> - Official app website: <https://www.borgbackup.org/>

View file

@ -21,7 +21,7 @@ Setup a storage space to be used for backup using Borg
This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine. This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine.
**Versión actual:** 1.2.8~ynh5 **Versión actual:** 1.4.0~ynh1
## Documentaciones y recursos ## Documentaciones y recursos
- Sitio web oficial: <https://www.borgbackup.org/> - Sitio web oficial: <https://www.borgbackup.org/>

View file

@ -21,7 +21,7 @@ Setup a storage space to be used for backup using Borg
This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine. This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine.
**Paketatutako bertsioa:** 1.2.8~ynh5 **Paketatutako bertsioa:** 1.4.0~ynh1
## Dokumentazioa eta baliabideak ## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://www.borgbackup.org/> - Aplikazioaren webgune ofiziala: <https://www.borgbackup.org/>

View file

@ -21,7 +21,7 @@ Setup a storage space to be used for backup using Borg
This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine. This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine.
**Version incluse:** 1.2.8~ynh5 **Version incluse:** 1.4.0~ynh1
## Documentations et ressources ## Documentations et ressources
- Site officiel de lapp: <https://www.borgbackup.org/> - Site officiel de lapp: <https://www.borgbackup.org/>

View file

@ -21,7 +21,7 @@ Setup a storage space to be used for backup using Borg
This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine. This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine.
**Versión proporcionada:** 1.2.8~ynh5 **Versión proporcionada:** 1.4.0~ynh1
## Documentación e recursos ## Documentación e recursos
- Web oficial da app: <https://www.borgbackup.org/> - Web oficial da app: <https://www.borgbackup.org/>

View file

@ -21,7 +21,7 @@ Setup a storage space to be used for backup using Borg
This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine. This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine.
**Versi terkirim:** 1.2.8~ynh5 **Versi terkirim:** 1.4.0~ynh1
## Dokumentasi dan sumber daya ## Dokumentasi dan sumber daya
- Website aplikasi resmi: <https://www.borgbackup.org/> - Website aplikasi resmi: <https://www.borgbackup.org/>

View file

@ -21,7 +21,7 @@ Setup a storage space to be used for backup using Borg
This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine. This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine.
**Поставляемая версия:** 1.2.8~ynh5 **Поставляемая версия:** 1.4.0~ynh1
## Документация и ресурсы ## Документация и ресурсы
- Официальный веб-сайт приложения: <https://www.borgbackup.org/> - Официальный веб-сайт приложения: <https://www.borgbackup.org/>

View file

@ -21,7 +21,7 @@ Setup a storage space to be used for backup using Borg
This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine. This app is the "server" part, meant to be installed on the machine providing the backup storage. It is designed to work in combination with the [borg 'client' app](https://apps.yunohost.org/app/borg) installed on a diffent machine.
**分发版本:** 1.2.8~ynh5 **分发版本:** 1.4.0~ynh1
## 文档与资源 ## 文档与资源
- 官方应用网站: <https://www.borgbackup.org/> - 官方应用网站: <https://www.borgbackup.org/>

View file

@ -7,6 +7,6 @@ ALERT_DELAY="$(grep '^alert_delay: ' /etc/yunohost/apps/__APP__/settings.yml | a
if [[ $(find /home/__SSH_USER__/backup/data -follow -mtime -${ALERT_DELAY} -ls | wc -l) > 0 ]]; then if [[ $(find /home/__SSH_USER__/backup/data -follow -mtime -${ALERT_DELAY} -ls | wc -l) > 0 ]]; then
: :
else else
echo "No file has been backuped in /home/__SSH_USER__ since ${ALERT_DELAY} days" \ echo "No file has been backed up in /home/__SSH_USER__ since ${ALERT_DELAY} days" \
| mail -s "[YNH] Backup missing : __SSH_USER__" $(grep '^alert_mails: ' /etc/yunohost/apps/__APP__/settings.yml | awk '{print $2}') | mail -s "[YNH] Backup missing : __SSH_USER__" $(grep '^alert_mails: ' /etc/yunohost/apps/__APP__/settings.yml | awk '{print $2}')
fi fi

View file

@ -7,7 +7,7 @@ name = "Borg Server"
description.en = "Offer backup storage to a friend" description.en = "Offer backup storage to a friend"
description.fr = "Offrez un espace de stockage à un⋅e ami⋅e" description.fr = "Offrez un espace de stockage à un⋅e ami⋅e"
version = "1.2.8~ynh5" version = "1.4.0~ynh1"
maintainers = ["ljf"] maintainers = ["ljf"]
@ -61,8 +61,8 @@ ram.runtime = "50M"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/borgbackup/borg/archive/refs/tags/1.2.8.tar.gz" url = "https://github.com/borgbackup/borg/archive/refs/tags/1.4.0.tar.gz"
sha256 = "0b7d124191372dda45274fbf9e393b066992fcfef05fea63714f7c5c1843fc7c" sha256 = "88d0e37bee67398ee12414c18d67502a5dbf06b1a72fbffe2e20fcd5736e7320"
# Only here to bump the package version # Only here to bump the package version
prefetch = false prefetch = false
@ -78,14 +78,15 @@ ram.runtime = "50M"
[resources.apt] [resources.apt]
packages = [ packages = [
"python3-pip", "python3",
"python3-dev", "python3-dev",
"python3-jinja2", "python3-pip",
"python3-setuptools",
"python3-venv", "python3-venv",
"libacl1-dev", "libacl1-dev",
"libssl-dev", "libssl-dev",
"liblz4-dev", "liblz4-dev",
"libzstd-dev",
"libxxhash-dev",
"libfuse3-dev", "libfuse3-dev",
"pkg-config", "pkg-config",
] ]

View file

@ -29,12 +29,12 @@ create_ssh_config() {
if [[ -n "$quota" ]]; then if [[ -n "$quota" ]]; then
extra="--storage-quota $quota" extra="--storage-quota $quota"
fi fi
command="$install_dir/venv/bin/borg serve $extra --restrict-to-repository $repository" command="PATH=$install_dir/venv/bin/:$PATH borg serve $extra --restrict-to-repository $repository"
ssh_opts="command=\"$command\",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc" ssh_opts="command=\"$command\",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc"
mkdir -p "$ssh_dir" mkdir -p "$ssh_dir"
touch "$ssh_dir/authorized_keys" touch "$ssh_dir/authorized_keys"
echo "$ssh_opts $public_key" >> "$ssh_dir/authorized_keys" echo "$ssh_opts $public_key" > "$ssh_dir/authorized_keys"
chown -R "$ssh_user:$ssh_user" "$ssh_dir" chown -R "$ssh_user:$ssh_user" "$ssh_dir"
chmod -R u=rwX,go=--- "$ssh_dir" chmod -R u=rwX,go=--- "$ssh_dir"