-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathsetup-for-run.sh
executable file
·40 lines (25 loc) · 1.43 KB
/
setup-for-run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
sudo systemctl stop mattermost
tar czPf ~/logs/archive-pre-$BUILD_ID.tar.gz ~/mattermost/logs
cp ~/mattermost/logs/mattermost.log $WORKSPACE/mm-latest.log
rm -f mattermost.tar.gz
# # Regular daily
wget https://releases.mattermost.com/mattermost-platform/master/mattermost-enterprise-linux-amd64.tar.gz
mv mattermost-enterprise-linux-amd64.tar.gz mattermost.tar.gz
# Use this to lock to specific version
#wget http://releases.mattermost.com/3.6.1/mattermost-enterprise-3.6.1-linux-amd64.tar.gz
#mv mattermost-enterprise-3.6.1-linux-amd64.tar.gz mattermost.tar.gz
rm -rf ~/mattermost
mkdir -p ~/mattermost
tar -C ~/ -xzf mattermost.tar.gz
cp ~/config.json ~/mattermost/config/config.json
cd ~/mattermost
./bin/platform reset --confirm true
./bin/platform user create --email test@test.com --username test --password passwd
./bin/platform user create --email test2@test.com --username test2 --password passwd
./bin/platform user create --email test3@test.com --username test3 --password passwd
./bin/platform user create --email test4@test.com --username test4 --password passwd
./bin/platform team create --name ui-automation --display_name "UI Automation" --email "test2@test.com"
./bin/platform team add ui-automation test@test.com test2@test.com test3@test.com test4@test.com
mysql -u mmuser -ppasswd -h localhost -e "UPDATE Preferences SET Value = '999' WHERE Category = 'tutorial_step';" mattermost
sudo systemctl start mattermost