Skip to content

Instantly share code, notes, and snippets.

@megos
Last active March 22, 2023 23:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save megos/817255074a2a143abab729b4c746dd38 to your computer and use it in GitHub Desktop.
Save megos/817255074a2a143abab729b4c746dd38 to your computer and use it in GitHub Desktop.
mattermost upgrade script
#!/bin/bash
if [ $# -ne 1 ]; then
echo 'Usage: ./mattermost_upgrade.sh [version]'
exit 1
fi
version=$1
cd /usr/local/src
wget https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz
tar zxf mattermost-${version}-linux-amd64.tar.gz
mv mattermost /usr/local/mattermost-${version}
cd /usr/local/mattermost-${version}/config
rm config.json
ln -s /etc/mattermost/config.json .
cd /usr/local/
chown -R mattermost:mattermost mattermost-${version}
systemctl stop mattermost
rm mattermost
ln -s mattermost-${version} mattermost
systemctl start mattermost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment