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
5a7b6cd6c9
commit
94335546ea
3 changed files with 31 additions and 31 deletions
|
@ -144,7 +144,7 @@
|
||||||
},
|
},
|
||||||
"SqlSettings": {
|
"SqlSettings": {
|
||||||
"DriverName": "mysql",
|
"DriverName": "mysql",
|
||||||
"DataSource": "__DB_USER__:__DB_PASS__@tcp(localhost:3306)/__DB_NAME__?charset=utf8mb4,utf8",
|
"DataSource": "mysql://__DB_USER__:__DB_PASS__@tcp(localhost:3306)/__DB_NAME__?charset=utf8mb4,utf8",
|
||||||
"DataSourceReplicas": [],
|
"DataSourceReplicas": [],
|
||||||
"DataSourceSearchReplicas": [],
|
"DataSourceSearchReplicas": [],
|
||||||
"MaxIdleConns": 20,
|
"MaxIdleConns": 20,
|
||||||
|
@ -321,14 +321,14 @@
|
||||||
"LdapSettings": {
|
"LdapSettings": {
|
||||||
"Enable": false,
|
"Enable": false,
|
||||||
"EnableSync": false,
|
"EnableSync": false,
|
||||||
"LdapServer": "",
|
"LdapServer": "ldap://127.0.0.1",
|
||||||
"LdapPort": 389,
|
"LdapPort": 389,
|
||||||
"ConnectionSecurity": "",
|
"ConnectionSecurity": "",
|
||||||
"BaseDN": "",
|
"BaseDN": "ou=users,dc=yunohost,dc=org",
|
||||||
"BindUsername": "",
|
"BindUsername": "cn",
|
||||||
"BindPassword": "",
|
"BindPassword": "",
|
||||||
"UserFilter": "",
|
"UserFilter": "",
|
||||||
"GroupFilter": "",
|
"GroupFilter": "(&(|(objectclass=posixAccount))(uid={{username}})(permission=cn=mattermost.main,ou=permission,dc=yunohost,dc=org))",
|
||||||
"GuestFilter": "",
|
"GuestFilter": "",
|
||||||
"EnableAdminFilter": false,
|
"EnableAdminFilter": false,
|
||||||
"AdminFilter": "",
|
"AdminFilter": "",
|
||||||
|
|
|
@ -58,6 +58,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RECREATE THE DEDICATED USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||||
|
|
||||||
|
# Create the dedicated user (if not existing)
|
||||||
|
ynh_system_user_create --username=$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE APP DATA
|
# RESTORE THE APP DATA
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -74,14 +82,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RECREATE THE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
|
||||||
ynh_system_user_create --username=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE USER RIGHTS
|
# RESTORE USER RIGHTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -59,28 +59,28 @@ if ! [[ "$port" ]]; then
|
||||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Language if not present
|
# # Language if not present
|
||||||
if ! [[ "$language" ]]; then
|
# if ! [[ "$language" ]]; then
|
||||||
language="en"
|
# language="en"
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
# ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Cleaning legacy permissions
|
# # Cleaning legacy permissions
|
||||||
if ynh_legacy_permissions_exists; then
|
# if ynh_legacy_permissions_exists; then
|
||||||
ynh_legacy_permissions_delete_all
|
# ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
ynh_app_setting_delete --app=$app --key=is_public
|
# ynh_app_setting_delete --app=$app --key=is_public
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
if ! ynh_permission_exists --permission="admin"; then
|
# if ! ynh_permission_exists --permission="admin"; then
|
||||||
# Create the required permissions
|
# # Create the required permissions
|
||||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
# ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Create a permission if needed
|
# # Create a permission if needed
|
||||||
if ! ynh_permission_exists --permission="api"; then
|
# if ! ynh_permission_exists --permission="api"; then
|
||||||
ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true"
|
# ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
|
|
Loading…
Add table
Reference in a new issue