mirror of
https://github.com/YunoHost-Apps/borgwarehouse_ynh.git
synced 2024-09-03 18:16:17 +02:00
commit
a4c9d76072
11 changed files with 28 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
|||
# All available README files by language
|
||||
|
||||
- [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)
|
||||
- [Lire le README en français](README_fr.md)
|
||||
- [Le o README en galego](README_gl.md)
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
||||
**Shipped version:** 2.3.0~ynh1
|
||||
**Shipped version:** 2.3.0~ynh2
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ No se debe editar a mano.
|
|||
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
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ EZ editatu eskuz.
|
|||
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
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ NON debe editarse manualmente.
|
|||
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
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository server.
|
||||
|
||||
|
||||
**分发版本:** 2.3.0~ynh1
|
||||
**分发版本:** 2.3.0~ynh2
|
||||
|
||||
## 截图
|
||||
|
||||
|
|
|
@ -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__'
|
|
@ -7,7 +7,7 @@ name = "BorgWarehouse"
|
|||
description.en = "WebUI for a BorgBackup's central repository server"
|
||||
description.fr = "WebUI pour BorgBackup"
|
||||
|
||||
version = "2.3.0~ynh1"
|
||||
version = "2.3.0~ynh2"
|
||||
|
||||
maintainers = []
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
nodejs_version=18
|
||||
nodejs_version=20
|
||||
ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
|
||||
main_domain=$(cat /etc/yunohost/current_host)
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -31,14 +29,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
|||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
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"
|
||||
|
||||
|
@ -51,6 +45,11 @@ ynh_add_nginx_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"
|
||||
|
||||
#=================================================
|
||||
|
@ -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"
|
||||
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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue