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": {
|
||||
"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": [],
|
||||
"DataSourceSearchReplicas": [],
|
||||
"MaxIdleConns": 20,
|
||||
|
@ -321,14 +321,14 @@
|
|||
"LdapSettings": {
|
||||
"Enable": false,
|
||||
"EnableSync": false,
|
||||
"LdapServer": "",
|
||||
"LdapServer": "ldap://127.0.0.1",
|
||||
"LdapPort": 389,
|
||||
"ConnectionSecurity": "",
|
||||
"BaseDN": "",
|
||||
"BindUsername": "",
|
||||
"BaseDN": "ou=users,dc=yunohost,dc=org",
|
||||
"BindUsername": "cn",
|
||||
"BindPassword": "",
|
||||
"UserFilter": "",
|
||||
"GroupFilter": "",
|
||||
"GroupFilter": "(&(|(objectclass=posixAccount))(uid={{username}})(permission=cn=mattermost.main,ou=permission,dc=yunohost,dc=org))",
|
||||
"GuestFilter": "",
|
||||
"EnableAdminFilter": false,
|
||||
"AdminFilter": "",
|
||||
|
|
|
@ -58,6 +58,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
|
||||
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
|
||||
#=================================================
|
||||
|
@ -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_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
|
||||
#=================================================
|
||||
|
|
|
@ -59,28 +59,28 @@ if ! [[ "$port" ]]; then
|
|||
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
fi
|
||||
|
||||
# Language if not present
|
||||
if ! [[ "$language" ]]; then
|
||||
language="en"
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
fi
|
||||
# # Language if not present
|
||||
# if ! [[ "$language" ]]; then
|
||||
# language="en"
|
||||
# ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
# fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
# # Cleaning legacy permissions
|
||||
# if ynh_legacy_permissions_exists; then
|
||||
# ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
# ynh_app_setting_delete --app=$app --key=is_public
|
||||
# fi
|
||||
|
||||
if ! ynh_permission_exists --permission="admin"; then
|
||||
# Create the required permissions
|
||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||
fi
|
||||
# if ! ynh_permission_exists --permission="admin"; then
|
||||
# # Create the required permissions
|
||||
# ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||
# fi
|
||||
|
||||
# Create a permission if needed
|
||||
if ! ynh_permission_exists --permission="api"; then
|
||||
ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true"
|
||||
fi
|
||||
# # Create a permission if needed
|
||||
# if ! ynh_permission_exists --permission="api"; then
|
||||
# ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true"
|
||||
# fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
|
|
Loading…
Add table
Reference in a new issue