Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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