From 1720b5ae1e18773b8a94ac51ea1bcb38b5168aab Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 30 Jan 2022 16:28:10 +0100 Subject: [PATCH] Fix --- scripts/change_url | 9 ++------- scripts/install | 22 ++++++++++------------ scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 495b7eb..6721178 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -29,11 +29,6 @@ ynh_script_progression --message="Loading installation settings..." --time --wei # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) -# Add settings here as needed by your application -#db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#db_user=$db_name -#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) - #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= @@ -74,7 +69,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -118,7 +113,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index cf7f501..2dd1834 100755 --- a/scripts/install +++ b/scripts/install @@ -35,9 +35,9 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." --time --weight=1 +ynh_script_progression --message="Validating installation parameters..." --weight=1 -final_path=/opt/yunohost/$app +final_path="/opt/yunohost/$app" test ! -e "$final_path" || ynh_die --message="This path already contains a folder" mc_path=$final_path/mc @@ -48,7 +48,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --time --weight=1 +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 @@ -96,7 +96,7 @@ chmod +x "$final_path/minio" #================================================= # DOWNLOAD, CHECK AND UNPACK MINIO CLIENT #================================================= -# ynh_script_progression --message="Setting up MinIO client..." --time --weight=1 +# ynh_script_progression --message="Setting up MinIO client..." --weight=1 # ynh_setup_source --dest_dir="$mc_path" --source_id="mc" @@ -165,15 +165,15 @@ yunohost service add $app --description="A High Performance, Kubernetes Native O #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 +ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." --time --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] @@ -184,16 +184,14 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload -sleep 5 - #================================================= # SETUP MINIO CLIENT #================================================= -# ynh_script_progression --message="Configuring MinIO client..." --time --weight=1 +# ynh_script_progression --message="Configuring MinIO client..." --weight=1 # pushd $mc_path # ynh_exec_warn_less sudo -u $app ./mc alias set minio "https://$domain" "$app" "$minio_key" @@ -203,4 +201,4 @@ sleep 5 # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --time --last \ No newline at end of file +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/restore b/scripts/restore index ef1f884..4846a4e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -118,7 +118,7 @@ yunohost service add $app --description="A High Performance, Kubernetes Native O #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index ca9bf7f..5d15b7f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,7 +132,7 @@ yunohost service add $app --description="A High Performance, Kubernetes Native O #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # RELOAD NGINX