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

upgrade: stop the server after downloading the new release

This will minimize downtime.
This commit is contained in:
Pierre de La Morinerie 2017-09-12 15:29:47 +05:30
parent ff4f8ba8fd
commit ca8a3c761d

View file

@ -27,13 +27,13 @@ function cleanup_and_restart
}
trap cleanup_and_restart ERR
# Stop server
sudo supervisorctl stop mattermost
# Download code
archive_url="https://releases.mattermost.com/${version}/mattermost-team-${version}-linux-amd64.tar.gz"
sudo wget --quiet --output-document "$archive_filename" "$archive_url"
# Stop server
sudo supervisorctl stop mattermost
# Backup configuration file
config_file="$final_path/config/config.json"
backup_config_file="/tmp/config.json"