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) 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 ## 截图 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 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 = [] 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) diff --git a/scripts/upgrade b/scripts/upgrade index d609955..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" @@ -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 #=================================================