Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
mattermost upgrade script
if [ $# -ne 1 ]; then
echo 'Usage: ./ [version]'
exit 1
cd /usr/local/src
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