-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
72 lines (63 loc) · 3.13 KB
/
start.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# Cache sudo credentials
sudo echo
# WSL screen hotfix
if grep -q Microsoft /proc/version; then
sudo service screen-cleanup start
fi
# Prepare workdir
rm -rf workdir
mkdir workdir
cd workdir
# Prepare DB
if grep -q Microsoft /proc/version; then
echo Assuming mysql server is running on windows side
mysql -h 127.0.0.1 -u root -e "DROP DATABASE authmetest;"
mysql -h 127.0.0.1 -u root -e "CREATE DATABASE authmetest;"
else
sudo service mysql start
mysql -u root -e "DROP DATABASE authmetest;"
mysql -u root -e "CREATE DATABASE authmetest;"
fi
# Download stuff
mkdir tmp
cd tmp
#wget --no-verbose --no-hsts --show-progress --trust-server-names https://ci.codemc.org/job/sgdc3/job/DownloadScraper/lastSuccessfulBuild/artifact/target/downloadscraper-1.0-SNAPSHOT.jar
wget --no-verbose --no-hsts --show-progress --trust-server-names https://papermc.io/ci/job/Paper-1.13/lastSuccessfulBuild/artifact/paperclip.jar
wget --no-verbose --no-hsts --show-progress --trust-server-names https://papermc.io/ci/view/WaterfallMC/job/Waterfall/lastSuccessfulBuild/artifact/Waterfall-Proxy/bootstrap/target/Waterfall.jar
#java -jar downloadscraper-1.0-SNAPSHOT.jar ./ "https://ci.codemc.org/job/AuthMe/job/AuthMeReloaded/" firstMatch "AuthMe-.*\SNAPSHOT.jar"
#java -jar downloadscraper-1.0-SNAPSHOT.jar ./ "https://ci.codemc.org/job/AuthMe/job/AuthMeBungee/" firstMatch "AuthMeBungee-.*\SNAPSHOT.jar"
wget --no-verbose --no-hsts --show-progress --trust-server-names https://ci.codemc.org/job/AuthMe/job/AuthMeReloaded/lastSuccessfulBuild/artifact/target/AuthMe-5.5.1-SNAPSHOT.jar
wget --no-verbose --no-hsts --show-progress --trust-server-names https://ci.codemc.org/job/AuthMe/job/AuthMeBungee/lastSuccessfulBuild/artifact/target/AuthMeBungee-2.1.0-SNAPSHOT.jar
wget --no-verbose --no-hsts --show-progress --trust-server-names http://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBuild/artifact/modules/ProtocolLib/target/ProtocolLib.jar
#java -jar ../downloadscraper-1.0-SNAPSHOT.jar ./ "https://ci.lucko.me/view/LuckPerms/job/LuckPerms/" firstMatch "LuckPerms-Bukkit-.*\.jar"
wget --no-verbose --no-hsts --show-progress --trust-server-names https://ci.lucko.me/view/LuckPerms/job/LuckPerms/850/artifact/bukkit/build/libs/LuckPerms-Bukkit-4.3.74.jar
wget --no-verbose --no-hsts --show-progress --trust-server-names https://build.true-games.org/job/ProtocolSupport/lastSuccessfulBuild/artifact/target/ProtocolSupport.jar
cd ..
# Prepare and start instances
cp -r ../model/backend .
cd backend
cp ../tmp/paperclip.jar .
cp ../tmp/AuthMe-*.jar ./plugins
cp ../tmp/LuckPerms-*.jar ./plugins
cp ../tmp/ProtocolLib.jar ./plugins
cp ../tmp/ProtocolSupport.jar ./plugins
screen -dmS authme-backend java -Xmx512M -jar paperclip.jar
cd ..
cp -r ../model/lobby .
cd lobby
cp ../tmp/paperclip.jar .
cp ../tmp/AuthMe-*.jar ./plugins
cp ../tmp/LuckPerms-*.jar ./plugins
cp ../tmp/ProtocolLib.jar ./plugins
cp ../tmp/ProtocolSupport.jar ./plugins
screen -dmS authme-lobby java -Xmx512M -jar paperclip.jar
cd ..
cp -r ../model/proxy .
cd proxy
cp ../tmp/Waterfall.jar .
cp ../tmp/AuthMeBungee-*.jar ./plugins
screen -dmS authme-proxy java -Xmx512M -jar Waterfall.jar
cd ..
# Cleanup
rm -rf tmp