From 6ff11dacb201a08506b345953aa7b9bd39eeacf5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Feb 2020 18:44:50 +0100 Subject: Apply example_ynh --- scripts/install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/install') diff --git a/scripts/install b/scripts/install index 58f0caa..f769f03 100644 --- a/scripts/install +++ b/scripts/install @@ -17,6 +17,7 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= +ynh_script_progression --message="Managing script failure..." --weight=1 ynh_clean_setup () { ynh_clean_check_starting @@ -27,6 +28,7 @@ ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +ynh_script_progression --message="Retrieving arguments from the manifest..." --weight=1 domain=$YNH_APP_ARG_DOMAIN path_url="/" @@ -67,7 +69,7 @@ ynh_app_setting_set --app=$app --key=language --value=$language #================================================= ynh_script_progression --message="Configuring firewall..." --weight=1 -# Find a free port +# Find an available port port_web=$(ynh_find_port --port=3000) port_stream=$(ynh_find_port --port=4000) # Open this port @@ -91,7 +93,7 @@ ynh_script_progression --message="Creating a PostgreSQL database..." --weight=5 # Create postgresql database db_name="${app}_production" db_user=$app -db_pwd=$(ynh_string_random 30) +db_pwd=$(ynh_string_random --length30) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd ynh_psql_test_if_first_run @@ -129,6 +131,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # ADD SWAP IF NEEDED #================================================= +ynh_script_progression --message="Adding swap is needed..." --weight=4 total_memory=$(ynh_check_ram) total_swap=$(ynh_check_ram --only_swap) -- cgit v1.2.3-70-g09d2 From 3a7b21fbcbede1ee108bb5b94b7c6a1717cdaa2c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Feb 2020 19:51:58 +0100 Subject: Apply example_ynh --- scripts/install | 4 ++-- scripts/remove | 2 +- scripts/restore | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/install') diff --git a/scripts/install b/scripts/install index f769f03..60787e7 100644 --- a/scripts/install +++ b/scripts/install @@ -254,9 +254,9 @@ ynh_script_progression --message="Securing files and directories..." --weight=9 chown -R "$app": "$final_path" #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Advertising service in admin panel..." --weight=3 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=3 yunohost service add "$app-web" yunohost service add "$app-sidekiq" diff --git a/scripts/remove b/scripts/remove index b88da99..f2b2e16 100644 --- a/scripts/remove +++ b/scripts/remove @@ -31,7 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Removing service integration in YunoHost..." --weight=2 -# Remove a service from the admin panel, added by `yunohost service add` +# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status "$app-web" >/dev/null then ynh_script_progression --message="Removing $app-web service..." --weight=2 diff --git a/scripts/restore b/scripts/restore index a45925e..c6e4bc8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -139,9 +139,9 @@ ynh_restore_file --origin_path="/etc/systemd/system/$app-streaming.service" systemctl enable "$app-web" "$app-sidekiq" "$app-streaming" #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Advertising service in admin panel..." --weight=3 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=3 yunohost service add $app-web yunohost service add $app-sidekiq -- cgit v1.2.3-70-g09d2 From f00ae6d6b926cf80236d98617b579c176beb8dfe Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 25 Feb 2020 00:17:48 +0100 Subject: ifx typo --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/install') diff --git a/scripts/install b/scripts/install index 60787e7..989954b 100644 --- a/scripts/install +++ b/scripts/install @@ -93,7 +93,7 @@ ynh_script_progression --message="Creating a PostgreSQL database..." --weight=5 # Create postgresql database db_name="${app}_production" db_user=$app -db_pwd=$(ynh_string_random --length30) +db_pwd=$(ynh_string_random --length=30) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd ynh_psql_test_if_first_run -- cgit v1.2.3-70-g09d2