mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
Fix
This commit is contained in:
parent
3d880d2f0d
commit
0b40b0ddc9
2 changed files with 21 additions and 6 deletions
|
@ -56,6 +56,13 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
|
||||
ynh_restore_file "$final_path"
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=10
|
||||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP DATA
|
||||
#=================================================
|
||||
|
@ -65,10 +72,11 @@ ynh_restore_file "$data_path"
|
|||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
|
||||
|
||||
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
||||
ynh_mysql_setup_db "$db_user" "$db_name" "$db_pwd"
|
||||
ynh_mysql_connect_as "$db_user" "$db_pwd" "$db_name" < ./db.sql
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
|
|
|
@ -116,6 +116,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=10
|
||||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
@ -144,9 +151,9 @@ fi
|
|||
# RESTORE FILE PERMISSIONS
|
||||
#=================================================
|
||||
|
||||
chown -R "$mattermost_user:www-data" "$final_path"
|
||||
chown -R "$mattermost_user:www-data" "$data_path"
|
||||
chown -R "$mattermost_user:adm" "$logs_path"
|
||||
chown -R "$app:www-data" "$final_path"
|
||||
chown -R "$app:www-data" "$data_path"
|
||||
chown -R "$app:adm" "$logs_path"
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
|
|
Loading…
Add table
Reference in a new issue