1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

Log to file

This commit is contained in:
Pierre de La Morinerie 2015-10-21 14:46:47 +02:00
parent 3a18af006e
commit f614cb00dd
2 changed files with 4 additions and 2 deletions

View file

@ -4,5 +4,3 @@ command=/var/www/mattermost/bin/platform
user=www
startsecs=5
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/mattermost.log

View file

@ -53,6 +53,7 @@ sudo cp -af $root_path/sources/. $final_path
# Change variables in Mattermost config
db_connection_url="${db_user}:${db_password}@tcp(127.0.0.1:3306)/${db_name}?charset=utf8mb4,utf8"
sudo sed -i "s|\"DataSource\": \".*\"|\"DataSource\": \"${db_connection_url}\"|g" $final_path/config/config.json
sudo sed -i "s|\"SendEmailNotifications\": false|\"SendEmailNotifications\": true|g" $final_path/config/config.json
sudo sed -i "s|\"FeedbackName\": \"\"|\"FeedbackName\": \"Mattermost notification\"|g" $final_path/config/config.json
sudo sed -i "s|\"FeedbackEmail\": \"\"|\"FeedbackEmail\": \"no-reply@${domain}\"|g" $final_path/config/config.json
@ -61,6 +62,9 @@ sudo sed -i "s|\"SMTPPassword\": \"\"|\"SMTPPassword\": \"${smtp_password}\"|g"
sudo sed -i "s|\"SMTPServer\": \"\"|\"SMTPServer\": \"localhost\"|g" $final_path/config/config.json
sudo sed -i "s|\"SMTPPort\": \"\"|\"SMTPPort\": \"25\"|g" $final_path/config/config.json
sudo sed -i "s|\"EnableConsole\": true|\"EnableConsole\": false|g" $final_path/config/config.json
sudo sed -i "s|\"FileLocation\": \"\"|\"FileLocation\": \"/var/log/mattermost.log\"|g" $final_path/config/config.json
# Set permissions to app directory
sudo chown -R www-data: $final_path