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:
parent
ff4f8ba8fd
commit
ca8a3c761d
1 changed files with 3 additions and 3 deletions
|
@ -27,13 +27,13 @@ function cleanup_and_restart
|
||||||
}
|
}
|
||||||
trap cleanup_and_restart ERR
|
trap cleanup_and_restart ERR
|
||||||
|
|
||||||
# Stop server
|
|
||||||
sudo supervisorctl stop mattermost
|
|
||||||
|
|
||||||
# Download code
|
# Download code
|
||||||
archive_url="https://releases.mattermost.com/${version}/mattermost-team-${version}-linux-amd64.tar.gz"
|
archive_url="https://releases.mattermost.com/${version}/mattermost-team-${version}-linux-amd64.tar.gz"
|
||||||
sudo wget --quiet --output-document "$archive_filename" "$archive_url"
|
sudo wget --quiet --output-document "$archive_filename" "$archive_url"
|
||||||
|
|
||||||
|
# Stop server
|
||||||
|
sudo supervisorctl stop mattermost
|
||||||
|
|
||||||
# Backup configuration file
|
# Backup configuration file
|
||||||
config_file="$final_path/config/config.json"
|
config_file="$final_path/config/config.json"
|
||||||
backup_config_file="/tmp/config.json"
|
backup_config_file="/tmp/config.json"
|
||||||
|
|
Loading…
Add table
Reference in a new issue