From 92b011b1b5f8de287fc50b87da41a0468c656787 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 19 Nov 2022 17:37:14 +0100 Subject: [PATCH] bunch of cleaning --- check_process | 14 +++++++------- doc/DESCRIPTION.md | 2 +- doc/DESCRIPTION_fr.md | 2 +- manifest.json | 6 +++++- scripts/install | 10 +++++----- scripts/remove | 2 +- scripts/restore | 9 ++++++++- scripts/upgrade | 2 +- 8 files changed, 29 insertions(+), 18 deletions(-) diff --git a/check_process b/check_process index 437e029..f3a5ec9 100644 --- a/check_process +++ b/check_process @@ -7,16 +7,16 @@ ; Checks pkg_linter=1 setup_sub_dir=1 - setup_root=0 + setup_root=1 setup_nourl=0 - setup_private=0 - setup_public=0 - upgrade=0 + setup_private=1 + setup_public=1 + upgrade=1 upgrade=0 from_commit=CommitHash - backup_restore=0 + backup_restore=1 multi_instance=0 - port_already_use=0 - change_url=0 + port_already_use=1 + change_url=1 ;;; Options Email=misterl56@hotmail.com Notification=none diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 4ff1dfd..12fe249 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -2,4 +2,4 @@ ### Features -Aims to integrate zwave-js-ui natively in Domoticz_ynh \ No newline at end of file +Integrate zwave-js-ui natively in Domoticz_ynh \ No newline at end of file diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index da6b0f9..e8afd6f 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -3,4 +3,4 @@ ### Fonctionnalités -Vise à intégrer zwave-js-ui dans domoticz_ynh de façon native \ No newline at end of file +Intègre zwave-js-ui dans domoticz_ynh de façon native \ No newline at end of file diff --git a/manifest.json b/manifest.json index e3226d8..d2c539f 100644 --- a/manifest.json +++ b/manifest.json @@ -42,7 +42,11 @@ { "name": "is_public", "type": "boolean", - "default": false + "default": false, + "help": { + "en": "If set public, anyone can access the app without login in yunohost, you activate password protected login from within the app", + "fr": "Si publique, N'importe qui peut accéder à l'application sans se connecter à yunohost, vous pouvez cependant activer une connection par mot de passe depuis l'application" + } } ] } diff --git a/scripts/install b/scripts/install index 6c5f08c..18b7c14 100755 --- a/scripts/install +++ b/scripts/install @@ -73,7 +73,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression --message="Setting up source files..." --weight=15 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src @@ -86,7 +86,7 @@ chown -R $app: "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 +ynh_script_progression --message="Configuring NGINX web server..." --weight=5 # Create a dedicated NGINX config ynh_add_nginx_config @@ -101,7 +101,7 @@ ynh_add_nginx_config #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 ### You can add specific configuration files. ### @@ -133,7 +133,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 +ynh_script_progression --message="Configuring a systemd service..." --weight=5 # Create a dedicated systemd config ynh_add_systemd_config @@ -195,7 +195,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=11 # Make app public if necessary if [ $is_public -eq 1 ] diff --git a/scripts/remove b/scripts/remove index 4ddc118..ca21be7 100755 --- a/scripts/remove +++ b/scripts/remove @@ -94,7 +94,7 @@ ynh_secure_remove --file="/var/log/$app" #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 +ynh_script_progression --message="Removing the dedicated system user..." --weight=7 # Delete a system user ynh_system_user_delete --username=$app diff --git a/scripts/restore b/scripts/restore index bd7f64a..2e29b62 100755 --- a/scripts/restore +++ b/scripts/restore @@ -89,7 +89,7 @@ chown -R $app: "$final_path" #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -108,6 +108,13 @@ ynh_script_progression --message="Restoring the logrotate configuration..." --we ynh_restore_file --origin_path="/etc/logrotate.d/$app" +#================================================= +# RESTORE THE LOG FILE DIRECTORY +#================================================= +mkdir -p /var/log/$app +chown -R $app:$app /var/log/$app + + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 791c622..b0d0646 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -96,7 +96,7 @@ chown -R $app: "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config