mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
parent
9997d6cf88
commit
485136c06a
2 changed files with 4 additions and 7 deletions
|
@ -90,7 +90,7 @@
|
||||||
"EnableInlineLatex": true,
|
"EnableInlineLatex": true,
|
||||||
"EnableAPIChannelDeletion": false,
|
"EnableAPIChannelDeletion": false,
|
||||||
"EnableLocalMode": true,
|
"EnableLocalMode": true,
|
||||||
"LocalModeSocketLocation": "__LOCAL_SOCKET_PATH__",
|
"LocalModeSocketLocation": "/var/run/__APP__/mattermost_local.socket",
|
||||||
"EnableAWSMetering": false,
|
"EnableAWSMetering": false,
|
||||||
"SplitKey": "",
|
"SplitKey": "",
|
||||||
"FeatureFlagSyncIntervalSeconds": 30,
|
"FeatureFlagSyncIntervalSeconds": 30,
|
||||||
|
@ -177,7 +177,7 @@
|
||||||
"EnableFile": true,
|
"EnableFile": true,
|
||||||
"FileLevel": "INFO",
|
"FileLevel": "INFO",
|
||||||
"FileJson": true,
|
"FileJson": true,
|
||||||
"FileLocation": "__LOGS_PATH__",
|
"FileLocation": "/var/log/__APP__",
|
||||||
"AdvancedLoggingConfig": ""
|
"AdvancedLoggingConfig": ""
|
||||||
},
|
},
|
||||||
"PasswordSettings": {
|
"PasswordSettings": {
|
||||||
|
|
|
@ -127,9 +127,7 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1
|
||||||
|
|
||||||
# Create log directory
|
# Create log directory
|
||||||
mkdir -p /var/log/$app
|
mkdir -p /var/log/$app
|
||||||
#touch /var/log/$app/$app.log
|
chown $app -R "/var/log/$app"
|
||||||
logs_path="/var/log/$app"
|
|
||||||
chown $app -R $logs_path
|
|
||||||
|
|
||||||
# Setup logrotate
|
# Setup logrotate
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
@ -143,7 +141,6 @@ ynh_script_progression --message="Modifying a config file..." --weight=3
|
||||||
|
|
||||||
smtp_user_pwd=$(ynh_string_random --length=24)
|
smtp_user_pwd=$(ynh_string_random --length=24)
|
||||||
url=https://$domain$path_url
|
url=https://$domain$path_url
|
||||||
local_socket_path="/var/run/${app}/mattermost_local.socket"
|
|
||||||
|
|
||||||
ynh_add_config --template="../conf/config.json" --destination="$final_path/config/config.json"
|
ynh_add_config --template="../conf/config.json" --destination="$final_path/config/config.json"
|
||||||
|
|
||||||
|
@ -189,7 +186,7 @@ bin_mmctl="$final_path/bin/mmctl"
|
||||||
# mmctl is not packaged with ARM versions yet
|
# mmctl is not packaged with ARM versions yet
|
||||||
if [[ -f "$bin_mmctl" ]]; then
|
if [[ -f "$bin_mmctl" ]]; then
|
||||||
export MMCTL_LOCAL=true
|
export MMCTL_LOCAL=true
|
||||||
export MMCTL_LOCAL_SOCKET_PATH="$local_socket_path"
|
export MMCTL_LOCAL_SOCKET_PATH="/var/run/${app}/mattermost_local.socket"
|
||||||
|
|
||||||
ynh_exec_warn_less sudo --preserve-env -u $app "$bin_mmctl" user create --username "$admin" --email "$email" --password "$password" --locale "$language" --email-verified --system-admin
|
ynh_exec_warn_less sudo --preserve-env -u $app "$bin_mmctl" user create --username "$admin" --email "$email" --password "$password" --locale "$language" --email-verified --system-admin
|
||||||
ynh_exec_warn_less sudo --preserve-env -u $app "$bin_mmctl" team create --name "$team_name" --display_name "$team_display_name" --email "$email"
|
ynh_exec_warn_less sudo --preserve-env -u $app "$bin_mmctl" team create --name "$team_name" --display_name "$team_display_name" --email "$email"
|
||||||
|
|
Loading…
Add table
Reference in a new issue