From 56bc92655a92a5bb63a750cc456b5a0ab4b316aa Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 May 2024 11:09:57 +0700 Subject: [PATCH 1/8] Update upgrade --- scripts/upgrade | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index d609955..bec3360 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,6 +65,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 #================================================= From 4af284d94810391d46adde938f02047da90e66d4 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 May 2024 11:48:46 +0700 Subject: [PATCH 2/8] Updating every 10 minutes seems reasonable enough --- conf/cron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/cron b/conf/cron index 0a4a94e..e77dd92 100644 --- a/conf/cron +++ b/conf/cron @@ -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__' \ No newline at end of file +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__' \ No newline at end of file From 279f836dadda8a7f6c9c6cebe2bff04b48806c3a Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 May 2024 11:50:03 +0700 Subject: [PATCH 3/8] Update cron --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index bec3360..70a8806 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,6 +51,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" #================================================= From a01ee4f1359c6dc5bceaf26656f3521be4d7ab7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:12:09 +0200 Subject: [PATCH 4/8] Update upgrade --- scripts/upgrade | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 70a8806..274db0c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -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 +# 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" chown -R $app:www-data "/home/yunohost.app/$app/app" From 374f078661ed538a9231a247dec3471fe56c3267 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 17 Jun 2024 16:12:14 +0000 Subject: [PATCH 5/8] Auto-update READMEs --- ALL_README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALL_README.md b/ALL_README.md index 8938aae..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -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) From 7f931002e768428f667aa53232585ed2b8dbafd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:20:08 +0200 Subject: [PATCH 6/8] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b1923cd..1c52224 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -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) From d5d6ff09ef174d11bdc53883e757a18be9e89edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:50:53 +0200 Subject: [PATCH 7/8] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 4594d8b..5ad536c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -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 = [] From 21f4fcced5ef9b3c827ff44dca0514c663a819f3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 17 Jun 2024 16:50:58 +0000 Subject: [PATCH 8/8] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fc9031e..c05489e 100644 --- a/README.md +++ b/README.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 diff --git a/README_es.md b/README_es.md index 2a7c1b7..97eb0b5 100644 --- a/README_es.md +++ b/README_es.md @@ -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 diff --git a/README_eu.md b/README_eu.md index d5ece79..af52fe2 100644 --- a/README_eu.md +++ b/README_eu.md @@ -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 diff --git a/README_fr.md b/README_fr.md index 3f8ac86..579b1c7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -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 diff --git a/README_gl.md b/README_gl.md index 34ae618..306d7b2 100644 --- a/README_gl.md +++ b/README_gl.md @@ -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 diff --git a/README_zh_Hans.md b/README_zh_Hans.md index c4635ba..964b3fa 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -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 ## 截图