From 9be8d99cd85ab108877eadd1713376a7f9867608 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 27 May 2022 18:42:25 +0200 Subject: [PATCH 1/9] Apply last example_ynh --- .gitignore | 2 -- check_process | 8 ++--- conf/.env | 11 +++++++ conf/dev.js | 9 ------ conf/nginx.conf | 2 +- conf/systemd.service | 4 ++- manifest.json | 2 +- scripts/backup | 1 - scripts/change_url | 4 ++- scripts/install | 27 +++++++++-------- scripts/remove | 4 +-- scripts/restore | 6 ++-- scripts/upgrade | 47 ++++++++++++++++++++++++------ sources/extra_files/app/.gitignore | 2 -- sources/patches/.gitignore | 2 -- 15 files changed, 77 insertions(+), 54 deletions(-) delete mode 100644 .gitignore create mode 100644 conf/.env delete mode 100644 conf/dev.js delete mode 100644 sources/extra_files/app/.gitignore delete mode 100644 sources/patches/.gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/check_process b/check_process index e9a7b9a..cf97ffd 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" - path="/" is_public=1 - port="3333" ; Checks pkg_linter=1 setup_sub_dir=0 @@ -12,13 +10,11 @@ setup_private=1 setup_public=1 upgrade=1 + #upgrade=1 from_commit=CommitHash backup_restore=1 multi_instance=1 + port_already_use=0 change_url=1 ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&is_public=1&language=fr&admin=USER&password=pass&port=666& diff --git a/conf/.env b/conf/.env new file mode 100644 index 0000000..2e0360c --- /dev/null +++ b/conf/.env @@ -0,0 +1,11 @@ +NODE_ENV=production +PORT=__PORT__ +HOST=localhost +CONFIG_PATH=__DATADIR__/config +AUDIOBOOK_PATH=__DATADIR__/audiobooks +METADATA_PATH=__DATADIR__/metadata +AUDIOBOOKSHELF_UID=__APP__ +AUDIOBOOKSHELF_GID=__APP__ +FFMPEG_PATH=/usr/bin/ffmpeg +FFPROBE_PATH=/usr/bin/ffprobe +SOURCE=local diff --git a/conf/dev.js b/conf/dev.js deleted file mode 100644 index 7d97588..0000000 --- a/conf/dev.js +++ /dev/null @@ -1,9 +0,0 @@ -const Path = require('path') -module.exports.config = { - Port: __PORT__, - ConfigPath: Path.resolve('__DATADIR__/config'), - AudiobookPath: Path.resolve('__DATADIR__/audiobooks'), - MetadataPath: Path.resolve('__DATADIR__/metadata'), - FFmpegPath: '/usr/bin/ffmpeg', - FFProbePath: '/usr/bin/ffprobe' -} \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index 86e1019..c12d0e7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -19,4 +19,4 @@ location __PATH__/ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; -} \ No newline at end of file +} diff --git a/conf/systemd.service b/conf/systemd.service index c87ba76..77cdd8a 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,9 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__YNH_NPM__ run prod +EnvironmentFile=__FINALPATH__/.env +Environment="__YNH_NODE_LOAD_PATH__" +ExecStart=__YNH_NODE__ prod.js StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit Restart=on-failure diff --git a/manifest.json b/manifest.json index 7b694ce..c3823b4 100644 --- a/manifest.json +++ b/manifest.json @@ -28,7 +28,7 @@ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" diff --git a/scripts/backup b/scripts/backup index 4ba0b55..67278fd 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script diff --git a/scripts/change_url b/scripts/change_url index 902e7e4..3bf562d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -38,6 +38,7 @@ ynh_script_progression --message="Backing up the app before changing its URL (ma # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" @@ -108,7 +109,8 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --timeout="120" +# Start a systemd service +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Listening on" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index bf5110b..424060c 100755 --- a/scripts/install +++ b/scripts/install @@ -14,8 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -49,8 +48,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -#ynh_app_setting_set --app=$app --key=nodejs_version --value=$nodejs_version - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -59,7 +56,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port -port=$(ynh_find_port --port=3333) +port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port #================================================= @@ -68,7 +65,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port ynh_script_progression --message="Installing dependencies..." --weight=10 ynh_install_app_dependencies $pkg_dependencies - ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= @@ -105,9 +101,16 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Installing Audiobookshelf..." --weight=10 +ynh_use_nodejs + +pushd $final_path/client + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ci + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm cache clean --force + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run generate +popd + pushd $final_path - ynh_use_nodejs - ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install run client + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ci --only=production popd #================================================= @@ -129,10 +132,10 @@ chown -R $app:www-data "$datadir" #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/dev.js" --destination="$final_path/dev.js" +ynh_add_config --template="../conf/.env" --destination="$final_path/.env" -chmod 400 "$final_path/dev.js" -chown $app:$app "$final_path/dev.js" +chmod 400 "$final_path/.env" +chown $app:$app "$final_path/.env" #================================================= # SETUP SYSTEMD @@ -165,7 +168,7 @@ yunohost service add $app --description="Audiobook server" --log="/var/log/$app/ ynh_script_progression --message="Starting a systemd service..." --weight=3 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --timeout="120" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Listening on" #================================================= # SETUP SSOWAT diff --git a/scripts/remove b/scripts/remove index 1f63c1c..45cd363 100755 --- a/scripts/remove +++ b/scripts/remove @@ -83,10 +83,8 @@ ynh_remove_nginx_config ynh_script_progression --message="Removing dependencies..." --weight=4 # Remove metapackage and its dependencies -ynh_remove_app_dependencies - -# Remove NodeJS ynh_remove_nodejs +ynh_remove_app_dependencies #================================================= # SPECIFIC REMOVE diff --git a/scripts/restore b/scripts/restore index eaeee5d..c81fb5a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -15,8 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -91,7 +90,6 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=10 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies - ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= @@ -121,7 +119,7 @@ yunohost service add $app --description="Audiobook server" --log="/var/log/$app/ #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --timeout="120" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Listening on" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 5e6fba2..b2ac005 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,6 +35,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -50,6 +51,13 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +ynh_delete_file_checksum --file="$final_path/.env" + #================================================= # CREATE DEDICATED USER #================================================= @@ -67,7 +75,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/dev.js" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env" fi chmod 750 "$final_path" @@ -88,18 +96,39 @@ ynh_add_nginx_config ynh_script_progression --message="Upgrading dependencies..." --weight=10 ynh_install_app_dependencies $pkg_dependencies - ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= -# Node Stuff +# SPECIFIC UPGRADE #================================================= -ynh_script_progression --message="Upgrading Audiobookshelf..." --weight=10 +# UPGRADE APP +#================================================= +ynh_script_progression --message="Upgrading app..." --weight=10 -pushd $final_path - ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run client -popd +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + ynh_use_nodejs + + pushd $final_path/client + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ci + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm cache clean --force + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run generate + popd + + pushd $final_path + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ci --only=production + popd +fi + +#================================================= +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating a configuration file..." + +ynh_add_config --template="../conf/.env" --destination="$final_path/.env" + +chmod 400 "$final_path/.env" +chown $app:$app "$final_path/.env" #================================================= # SETUP SYSTEMD @@ -131,7 +160,7 @@ yunohost service add $app --description="Audiobook server" --log="/var/log/$app/ #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --timeout="120" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Listening on" #================================================= # RELOAD NGINX diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/extra_files/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/patches/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] From 3633bac623dcf73fdbc00de833b1126665ae107f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 May 2022 16:42:31 +0000 Subject: [PATCH 2/9] Auto-update README --- README.md | 19 ++++++++++--------- README_fr.md | 25 +++++++++++++++---------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index f0ea061..2404187 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Audiobookshelf for YunoHost -[![Integration level](https://dash.yunohost.org/integration/audiobookshelf.svg)](https://dash.yunohost.org/appci/app/audiobookshelf) ![](https://ci-apps.yunohost.org/ci/badges/audiobookshelf.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/audiobookshelf.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/audiobookshelf.svg)](https://dash.yunohost.org/appci/app/audiobookshelf) ![Working status](https://ci-apps.yunohost.org/ci/badges/audiobookshelf.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/audiobookshelf.maintain.svg) [![Install Audiobookshelf with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=audiobookshelf) *[Lire ce readme en français.](./README_fr.md)* @@ -36,7 +36,7 @@ Audiobookshelf is a self-hosted audiobook server for managing and playing your a ## Screenshots -![](./doc/screenshots/example.jpg) +![Screenshot of Audiobookshelf](./doc/screenshots/example.jpg) ## Disclaimers / important information @@ -51,21 +51,22 @@ Audiobookshelf is a self-hosted audiobook server for managing and playing your a ## Documentation and resources -* Official app website: https://audiobookshelf.org/ -* Official user documentation: https://www.audiobookshelf.org/docs -* Upstream app code repository: https://github.com/advplyr/audiobookshelf -* YunoHost documentation for this app: https://yunohost.org/app_audiobookshelf -* Report a bug: https://github.com/YunoHost-Apps/audiobookshelf_ynh/issues +* Official app website: +* Official user documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/audiobookshelf_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/audiobookshelf_ynh/tree/testing --debug or sudo yunohost app upgrade audiobookshelf -u https://github.com/YunoHost-Apps/audiobookshelf_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 58c2736..a83c9d6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Audiobookshelf pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/audiobookshelf.svg)](https://dash.yunohost.org/appci/app/audiobookshelf) ![](https://ci-apps.yunohost.org/ci/badges/audiobookshelf.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/audiobookshelf.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/audiobookshelf.svg)](https://dash.yunohost.org/appci/app/audiobookshelf) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/audiobookshelf.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/audiobookshelf.maintain.svg) [![Installer Audiobookshelf avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=audiobookshelf) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Audiobookshelf rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -32,7 +36,7 @@ Audiobookshelf est un serveur auto-hébergé pour gérer et lire vos livres audi ## Captures d'écran -![](./doc/screenshots/example.jpg) +![Capture d'écran de Audiobookshelf](./doc/screenshots/example.jpg) ## Avertissements / informations importantes @@ -46,21 +50,22 @@ Audiobookshelf est un serveur auto-hébergé pour gérer et lire vos livres audi * L'utilisateur par défaut est `root`, sans mot de passe ## Documentations et ressources -* Site officiel de l'app : https://audiobookshelf.org/ -* Documentation officielle utilisateur : https://www.audiobookshelf.org/docs -* Dépôt de code officiel de l'app : https://github.com/advplyr/audiobookshelf -* Documentation YunoHost pour cette app : https://yunohost.org/app_audiobookshelf -* Signaler un bug : https://github.com/YunoHost-Apps/audiobookshelf_ynh/issues +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/audiobookshelf_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/audiobookshelf_ynh/tree/testing --debug ou sudo yunohost app upgrade audiobookshelf -u https://github.com/YunoHost-Apps/audiobookshelf_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 776a14db97fbe202c172e55236b98f8a60be47e5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 27 May 2022 18:42:53 +0200 Subject: [PATCH 3/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c3823b4..f362132 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Audiobook server for managing and playing your audiobooks", "fr": "Serveur de livres audio pour gérer et lire vos livres audio" }, - "version": "2.0.11~ynh1", + "version": "2.0.11~ynh2", "url": "https://audiobookshelf.org/", "upstream": { "license": "AGPL-3.0-only", From 1350634c32ee58ceeee5db99521f32e400050886 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 May 2022 21:33:41 +0000 Subject: [PATCH 4/9] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2404187..68aac68 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Audiobookshelf is a self-hosted audiobook server for managing and playing your a * Chromecast support on the web app * Fetch metadata and cover art from several sources -**Shipped version:** 2.0.11~ynh1 +**Shipped version:** 2.0.11~ynh2 **Demo:** https://audiobookshelf.org/ diff --git a/README_fr.md b/README_fr.md index a83c9d6..959dc56 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ Audiobookshelf est un serveur auto-hébergé pour gérer et lire vos livres audi * Support de Chromecast dans la webapp * Récupération des métadonnées et des pochettes depuis plusieurs sources -**Version incluse :** 2.0.11~ynh1 +**Version incluse :** 2.0.11~ynh2 **Démo :** https://audiobookshelf.org/ From b9798cd161a4bc4404e7e173583cbc6078e84576 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 30 May 2022 14:36:18 +0200 Subject: [PATCH 5/9] Update upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index b2ac005..6575131 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK VERSION From 4763e8dd31e79e2f6bcbc7f2e74b6efd0a92d606 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 30 May 2022 14:41:43 +0200 Subject: [PATCH 6/9] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 424060c..3de22b8 100755 --- a/scripts/install +++ b/scripts/install @@ -97,9 +97,9 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 ynh_add_nginx_config #================================================= -# Node Stuff +# BUILD APP #================================================= -ynh_script_progression --message="Installing Audiobookshelf..." --weight=10 +ynh_script_progression --message="Building app..." --weight=10 ynh_use_nodejs From 7709e0710e1a53179af1730ccc1578ac4bcef2bc Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 30 May 2022 14:41:47 +0200 Subject: [PATCH 7/9] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index c81fb5a..73d61f9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -126,7 +126,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server" --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload From 694dfbd088467f4d8ecff2a61b153098dfabf29f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 30 May 2022 14:41:52 +0200 Subject: [PATCH 8/9] Update upgrade --- scripts/upgrade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6575131..abb6957 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,7 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -57,8 +58,6 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -ynh_delete_file_checksum --file="$final_path/.env" - #================================================= # CREATE DEDICATED USER #================================================= From e73e347f35201ad7c2d16bdf207542ffef068098 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 2 Jun 2022 00:26:07 +0200 Subject: [PATCH 9/9] Update restore --- scripts/restore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/restore b/scripts/restore index 73d61f9..4061004 100755 --- a/scripts/restore +++ b/scripts/restore @@ -105,6 +105,8 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 +mkdir -p "/var/log/$app" +chown -R $app: "/var/log/$app" ynh_restore_file --origin_path="/etc/logrotate.d/$app" #=================================================