From 0e22bb6eb15d46f3747dcd9c148c928de05bdfda Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 31 Oct 2023 13:59:56 +0000 Subject: [PATCH 1/4] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 10554cd..44492a0 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ BorgWarhouse is a fast and modern WebUI for a BorgBackup's central repository se * Official app website: * Official admin documentation: * Upstream app code repository: +* YunoHost Store: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index e66a089..950e6d6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,6 +29,7 @@ BorgWarhouse est une interface Web rapide et moderne pour BorgBackup. * Site officiel de l’app : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : +* YunoHost Store: * Signaler un bug : ## Informations pour les développeurs From 56bc92655a92a5bb63a750cc456b5a0ab4b316aa Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 May 2024 11:09:57 +0700 Subject: [PATCH 2/4] 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 3/4] 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 4/4] 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" #=================================================