diff --git a/scripts/change_url b/scripts/change_url index fa4cd4c..ba15483 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -23,7 +23,7 @@ ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop" --log #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 ynh_change_url_nginx_config @@ -32,7 +32,7 @@ ynh_change_url_nginx_config #================================================= # UPDATE CONFIGURATION #================================================= -ynh_script_progression --message="Updating configuration..." +ynh_script_progression --message="Updating configuration..." --weight=1 # Update UWSGI Config ynh_add_uwsgi_service "python_version" diff --git a/scripts/install b/scripts/install index 9cfdaca..3a7621b 100644 --- a/scripts/install +++ b/scripts/install @@ -20,14 +20,14 @@ email=$(ynh_user_get_info --username $admin --key 'mail') #================================================= # Postgresql superuser #================================================= -ynh_script_progression --message="Configuring Postgresql superuser..." +ynh_script_progression --message="Configuring Postgresql superuser..." --weight 1 ynh_psql_execute_as_root --sql "ALTER USER $db_user WITH SUPERUSER CREATEDB CREATEROLE REPLICATION" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." +ynh_script_progression --message="Setting up source files..." --weight=5 ynh_install_venv _install_pgadmin_pip @@ -46,7 +46,7 @@ ynh_script_progression --message="Configuring pgAdmin..." --weight=1 ynh_add_config --template="config_local.py" --destination="$install_dir/venv/lib/python$python_version/site-packages/pgadmin4/config_local.py" chown -R "$app:root" "$install_dir" -ynh_add_config --template="setup.exp" --destination="$install_dir/setup.exp" +ynh_add_config --template="setup.exp" --destination="$install_dir/setup.exp" --weight=2 chmod +x "$install_dir/setup.exp" ynh_exec_as "$app" "$install_dir/setup.exp" "$install_dir/venv/bin/python3" "$install_dir/venv/lib/python$python_version/site-packages/pgadmin4/setup.py" setup-db diff --git a/scripts/remove b/scripts/remove index 66283a2..25c6b3a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -32,7 +32,7 @@ ynh_remove_nginx_config #================================================= # REMOVE VARIOUS FILES #================================================= -ynh_script_progression --message="Removing various files..." +ynh_script_progression --message="Removing various files..." --weight=1 # Remove the log files ynh_secure_remove --file="/var/log/$app" diff --git a/scripts/restore b/scripts/restore index e3d7f99..69b6cfa 100644 --- a/scripts/restore +++ b/scripts/restore @@ -48,7 +48,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE VARIOUS FILES #================================================= -ynh_script_progression --message="Restoring various files..." +ynh_script_progression --message="Restoring various files..." --weight=1 ynh_restore_file --origin_path="/var/log/$app/" chmod -R 750 /var/log/pgadmin @@ -56,7 +56,7 @@ chown -R "$app:root" /var/log/pgadmin # Restore systemd configuration -ynh_script_progression --message="Reconfiguring application..." +ynh_script_progression --message="Reconfiguring application..." --weight=1 ynh_restore_uwsgi_service #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f964603..52614a6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." +ynh_script_progression --message="Stopping a systemd service..." --weight=1 if [ -f "/etc/uwsgi/apps-available/$app.ini" ]; then ynh_systemd_action --service_name "uwsgi-app@$app.service" --action stop @@ -24,7 +24,7 @@ fi #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." +ynh_script_progression --message="Ensuring downward compatibility..." --weight=2 # Set the proper home directory usermod -d "$install_dir" "$app" @@ -39,11 +39,10 @@ if [ -d "/var/lib/pgadmin" ]; then ynh_secure_remove "/var/lib/pgadmin" fi - #================================================= # Postgresql superuser #================================================= -ynh_script_progression --message="Configuring Postgresql superuser..." +ynh_script_progression --message="Configuring Postgresql superuser..." --weight=1 # Re-set the db_pwd just in caseā€¦ ynh_psql_execute_as_root --sql "ALTER USER $app WITH PASSWORD '$db_pwd' SUPERUSER CREATEDB CREATEROLE REPLICATION"