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

Merge pull request #28 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2024-06-17 18:51:06 +02:00 committed by GitHub
commit a4c9d76072
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 28 additions and 19 deletions

View file

@ -1,7 +1,7 @@
# All available README files by language # All available README files by language
- [Read the README in English](README.md) - [Read the README in English](README.md)
- [Lee el README en español](README_es.md) - [Lea el README en español](README_es.md)
- [Irakurri README euskaraz](README_eu.md) - [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md) - [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md) - [Le o README en galego](README_gl.md)

View file

@ -19,7 +19,7 @@ It shall NOT be edited by hand.
BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server. BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server.
**Shipped version:** 2.3.0~ynh1 **Shipped version:** 2.3.0~ynh2
## Screenshots ## Screenshots

View file

@ -19,7 +19,7 @@ No se debe editar a mano.
BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server. BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server.
**Versión actual:** 2.3.0~ynh1 **Versión actual:** 2.3.0~ynh2
## Capturas ## Capturas

View file

@ -19,7 +19,7 @@ EZ editatu eskuz.
BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server. BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server.
**Paketatutako bertsioa:** 2.3.0~ynh1 **Paketatutako bertsioa:** 2.3.0~ynh2
## Pantaila-argazkiak ## Pantaila-argazkiak

View file

@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
BorgWarhouse est une interface Web rapide et moderne pour BorgBackup. BorgWarhouse est une interface Web rapide et moderne pour BorgBackup.
**Version incluse:** 2.3.0~ynh1 **Version incluse:** 2.3.0~ynh2
## Captures décran ## Captures décran

View file

@ -19,7 +19,7 @@ NON debe editarse manualmente.
BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server. BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server.
**Versión proporcionada:** 2.3.0~ynh1 **Versión proporcionada:** 2.3.0~ynh2
## Capturas de pantalla ## Capturas de pantalla

View file

@ -19,7 +19,7 @@
BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server. BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server.
**分发版本:** 2.3.0~ynh1 **分发版本:** 2.3.0~ynh2
## 截图 ## 截图

View file

@ -1 +1 @@
* * * * * root curl --request POST --url 'http://127.0.0.1:__PORT__/api/cronjob/checkStatus' --header 'Authorization: Bearer __CRON_KEY__' ; curl --request POST --url 'http://127.0.0.1:__PORT__/api/cronjob/getStorageUsed' --header 'Authorization: Bearer __CRON_KEY__' 10 * * * * root curl --request POST --url 'http://127.0.0.1:__PORT__/api/cronjob/checkStatus' --header 'Authorization: Bearer __CRON_KEY__' ; curl --request POST --url 'http://127.0.0.1:__PORT__/api/cronjob/getStorageUsed' --header 'Authorization: Bearer __CRON_KEY__'

View file

@ -7,7 +7,7 @@ name = "BorgWarehouse"
description.en = "WebUI for a BorgBackup's central repository server" description.en = "WebUI for a BorgBackup's central repository server"
description.fr = "WebUI pour BorgBackup" description.fr = "WebUI pour BorgBackup"
version = "2.3.0~ynh1" version = "2.3.0~ynh2"
maintainers = [] maintainers = []

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
nodejs_version=18 nodejs_version=20
ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+") ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
main_domain=$(cat /etc/yunohost/current_host) main_domain=$(cat /etc/yunohost/current_host)

View file

@ -9,8 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================
@ -31,14 +29,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from manifest.toml
then ynh_setup_source --dest_dir="/home/yunohost.app/$app/app" --keep="app/.env.local app/config/users.json app/config/repo.json"
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="/home/yunohost.app/$app/app" --keep="app/.env.local app/config/users.json app/config/repo.json"
fi
chown -R $app:www-data "/home/yunohost.app/$app/app" chown -R $app:www-data "/home/yunohost.app/$app/app"
@ -51,6 +45,11 @@ ynh_add_nginx_config
ynh_add_systemd_config ynh_add_systemd_config
# Update cron in case of changes
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
yunohost service add $app --description="WebUI for BorgBackup" --log="/var/log/$app/$app.log" yunohost service add $app --description="WebUI for BorgBackup" --log="/var/log/$app/$app.log"
#================================================= #=================================================
@ -65,6 +64,16 @@ ynh_add_config --template=".env" --destination="/home/yunohost.app/$app/app/.env
chmod 400 "/home/yunohost.app/$app/app/.env.local" chmod 400 "/home/yunohost.app/$app/app/.env.local"
chown $app:$app "/home/yunohost.app/$app/app/.env.local" chown $app:$app "/home/yunohost.app/$app/app/.env.local"
#=================================================
# INSTALL BORGWARHOUSE
#=================================================
pushd /home/yunohost.app/$app/app
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm ci
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production $ynh_npm run build
popd
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================