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 19:44:07 +01:00
parent 538d444e2c
commit 8e24afa81a
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 9 additions and 9 deletions

View file

@ -19,7 +19,7 @@
upgrade=1
backup_restore=1
multi_instance=1
port_already_use=1 (8085)
port_already_use=1 (8065)
change_url=0
setup_nourl=0
;;; Options

View file

@ -129,14 +129,14 @@ mkdir -p "$logs_path"
#=================================================
ynh_script_progression --message="Modifying a config file..."
cp ../conf/config.json "$final_path/config/config.json"
cp ../conf/config.json $final_path/config/config.json
# Main config File
ynh_replace_string --match_string="__URL__" --replace_string="https://$domain$path_url" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__PORT__" --replace_string="127.0.0.1:$port" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DATA__" --replace_string="$data_path" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DB_NAME__" --replace_string=$db_name --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DB_PASS__" --replace_string=$db_pwd --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DATA__" --replace_string=$data_path --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__FEEDBACK__" --replace_string="no-reply@${domain}" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$final_path/config/config.json"
@ -211,10 +211,10 @@ admin_username=$(cut -d @ -f 1 <<< "$admin_email")
team_name=$(echo "$team_display_name" | iconv -f utf8 -t ascii//TRANSLIT//IGNORE | sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z)
pushd "$final_path"
ynh_exec_as $app ./mattermost user create --username "$admin_username" --email "$admin_email" --password "$admin_password" --locale "$language" --system_admin
ynh_exec_as $app ./mattermost user verify "$admin_username"
ynh_exec_as $app ./mattermost team create --name "$team_name" --display_name "$team_display_name" --email "$admin_email"
ynh_exec_as $app ./mattermost team add "$team_name" "$admin_username"
./mattermost user create --username "$admin_username" --email "$admin_email" --password "$admin_password" --locale "$language" --system_admin
./mattermost user verify "$admin_username"
./mattermost team create --name "$team_name" --display_name "$team_display_name" --email "$admin_email"
./mattermost team add "$team_name" "$admin_username"
popd
#=================================================