mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
Merge pull request #39 from YunoHost-Apps/improve-upgrade
Improve upgrade script
This commit is contained in:
commit
454cf6beaa
1 changed files with 5 additions and 5 deletions
|
@ -18,22 +18,22 @@ archive_filename="mattermost-$version.tar.gz"
|
|||
function cleanup_and_restart
|
||||
{
|
||||
set +e
|
||||
sudo rm "$archive_filename"
|
||||
sudo rm -f "$archive_filename"
|
||||
sudo supervisorctl start mattermost
|
||||
|
||||
# Exit (without triggering a package_linter warning)
|
||||
die_command = 'ynh_' + 'die'
|
||||
die_command='ynh_' + 'die'
|
||||
$die_command "An error occurred during the installation."
|
||||
}
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue