mirror of
https://github.com/YunoHost-Apps/umami_ynh.git
synced 2024-10-01 13:34:50 +02:00
Fix
This commit is contained in:
parent
e3ab26977d
commit
f5da82f804
4 changed files with 13 additions and 12 deletions
|
@ -84,9 +84,9 @@ ynh_script_progression --message="Configuring system user..." --weight=1
|
||||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A POSTGRESQL DATABASE
|
# CREATE A DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2
|
ynh_script_progression --message="Creating a database..." --weight=2
|
||||||
|
|
||||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
|
@ -136,7 +136,6 @@ pushd $final_path
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn update-db
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn update-db
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -52,9 +52,9 @@ ynh_script_progression --message="Removing logrotate configuration..." --weight=
|
||||||
ynh_remove_logrotate
|
ynh_remove_logrotate
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE POSTGRESQL DATABASE
|
# REMOVE THE DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing the PostgreSQL database..." --weight=2
|
ynh_script_progression --message="Removing the database..." --weight=2
|
||||||
|
|
||||||
# Remove a database if it exists, along with the associated user
|
# Remove a database if it exists, along with the associated user
|
||||||
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
|
@ -76,6 +76,9 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
|
# Install Yarn
|
||||||
|
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -84,14 +87,9 @@ ynh_script_progression --message="Restoring the NGINX web server configuration..
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the MySQL database..." --time --weight=1
|
ynh_script_progression --message="Restoring the database..." --weight=6
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE POSTGRESQL DATABASE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
|
|
||||||
|
|
||||||
ynh_psql_test_if_first_run
|
ynh_psql_test_if_first_run
|
||||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||||
|
|
|
@ -81,10 +81,14 @@ chown -R $app:www-data "$final_path"
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=10
|
ynh_script_progression --message="Upgrading dependencies..." --weight=10
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
|
|
||||||
|
# Install Yarn
|
||||||
|
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue