From eb26d569ab73080bd4ec33a52bb77912b9d44ede Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 9 May 2022 20:43:21 +0200 Subject: [PATCH] Apply last example_ynh --- check_process | 4 --- conf/default.json | 73 +++++++++++++++++++++++----------------------- scripts/change_url | 1 + scripts/install | 1 - scripts/restore | 3 +- scripts/upgrade | 1 - 6 files changed, 38 insertions(+), 45 deletions(-) diff --git a/check_process b/check_process index 0b4078d..cf97ffd 100644 --- a/check_process +++ b/check_process @@ -18,7 +18,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1& diff --git a/conf/default.json b/conf/default.json index 14e2038..369d8a8 100644 --- a/conf/default.json +++ b/conf/default.json @@ -1,39 +1,38 @@ { - "team_name": "My Open Spacedeck", - "contact_email": "webmaster@__DOMAIN__", - - "host": "localhost", - "port": __PORT__, - "endpoint": "https://__DOMAIN____PATH__", - "invite_code": "__INVITE_SECRET__", - - "storage_dialect": "sqlite", - - "storage_host": "localhost", - "storage_database": "spacedeck", - "storage_username": "username", - "storage_password": "password", - - "storage_local_path": "__DATADIR__/storage", - "storage_local_db": "./database/database.sqlite", - "storage_region": "eu-central-1", - "storage_endpoint": "http://localhost:4572", - "storage_bucket": "my_spacedeck_bucket", - "storage_cdn": "/storage", - - "mongodb_host": "localhost", - "redis_mock": true, - "redis_host": "localhost", + "team_name": "YunoHost Spacedeck", + "contact_email": "webmaster@__DOMAIN__", - "export_api_secret": "__API_SECRET__", - - "mail_provider": "smtp", - "mail_smtp_host": "localhost", - "mail_smtp_port": 587, - "mail_smtp_secure": false, - "mail_smtp_require_tls": false, - "mail_smtp_user": "__APP__@__DOMAIN__", - "mail_smtp_pass": "", - "spacedeck": {} - } - \ No newline at end of file + "host": "localhost", + "port": __PORT__, + "endpoint": "https://__DOMAIN____PATH__", + "invite_code": "__INVITE_SECRET__", + + "storage_dialect": "sqlite", + + "storage_host": "localhost", + "storage_database": "spacedeck", + "storage_username": "username", + "storage_password": "password", + + "storage_local_path": "__DATADIR__/storage", + "storage_local_db": "./database/database.sqlite", + "storage_region": "eu-central-1", + "storage_endpoint": "http://localhost:4572", + "storage_bucket": "my_spacedeck_bucket", + "storage_cdn": "/storage", + + "mongodb_host": "localhost", + "redis_mock": true, + "redis_host": "localhost", + + "export_api_secret": "__API_SECRET__", + + "mail_provider": "smtp", + "mail_smtp_host": "localhost", + "mail_smtp_port": 25, + "mail_smtp_secure": false, + "mail_smtp_require_tls": false, + "mail_smtp_user": "__APP__@__DOMAIN__", + "mail_smtp_pass": "", + "spacedeck": {} +} diff --git a/scripts/change_url b/scripts/change_url index dd252b9..7c31186 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -47,6 +47,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" diff --git a/scripts/install b/scripts/install index 2af999a..6e582ae 100755 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port ynh_script_progression --message="Installing dependencies..." --weight=1 ynh_install_app_dependencies $pkg_dependencies - ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= diff --git a/scripts/restore b/scripts/restore index 5b1ccef..9302439 100755 --- a/scripts/restore +++ b/scripts/restore @@ -45,7 +45,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --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" @@ -90,7 +90,6 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies - ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4d45d90..1fdf8a4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,7 +105,6 @@ ynh_add_nginx_config ynh_script_progression --message="Upgrading dependencies..." --weight=1 ynh_install_app_dependencies $pkg_dependencies - ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #=================================================