1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00
This commit is contained in:
ericgaspar 2021-01-10 17:12:19 +01:00
parent 3d880d2f0d
commit 0b40b0ddc9
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 21 additions and 6 deletions

View file

@ -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

View file

@ -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