-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
25 lines (22 loc) · 814 Bytes
/
start.sh
File metadata and controls
25 lines (22 loc) · 814 Bytes
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
#!/bin/bash
set -euo pipefail
# check for serverstarter jar
if [[ -f serverstarter-2.0.1.jar ]]; then
echo "Skipping download. Using existing serverstarter-2.0.1.jar"
java -jar serverstarter-2.0.1.jar
exit 0
else
# download missing serverstarter jar
URL="https://github.com/AllTheMods/alltheservers/releases/download/2.0.1/serverstarter-2.0.1.jar"
if command -v wget &> /dev/null; then
echo "DEBUG: (wget) Downloading ${URL}"
wget -O serverstarter-2.0.1.jar "${URL}"
elif command -v curl &> /dev/null; then
echo "DEBUG: (curl) Downloading ${URL}"
curl -o serverstarter-2.0.1.jar "${URL}"
else
echo "Neither wget or curl were found on your system. Please install one and try again"
exit 1
fi
fi
java -jar serverstarter-2.0.1.jar