Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

startserver.sh: Fixup inconsistent whitespace #218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 27 additions & 26 deletions server_files/startserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,33 @@ if [[ $(cat server-setup-config.yaml | grep 'ramDisk:' | awk 'BEGIN {FS=":"}{pri
sudo mount -t tmpfs -o size=2G tmpfs $SAVE_DIR
DO_RAMDISK=1
fi
if [ -f serverstarter-2.1.1.jar ]; then
echo "Skipping download. Using existing serverstarter-2.1.1.jar"
java -jar serverstarter-2.1.1.jar
if [[ $DO_RAMDISK -eq 1 ]]; then
sudo umount $SAVE_DIR
rm -rf $SAVE_DIR
mv "${SAVE_DIR}_backup" $SAVE_DIR
fi
exit 0
else
export URL="https://github.com/TeamAOF/ServerStarter/releases/download/v2.1.1/serverstarter-2.1.1.jar"
fi
echo $URL
which wget >> /dev/null
if [ $? -eq 0 ]; then
echo "DEBUG: (wget) Downloading ${URL}"
wget -O serverstarter-2.1.1.jar "${URL}"
else
which curl >> /dev/null
if [ $? -eq 0 ]; then
echo "DEBUG: (curl) Downloading ${URL}"
curl -o serverstarter-2.1.1.jar "${URL}"
else
echo "Neither wget or curl were found on your system. Please install one and try again"
fi
fi

if [ -f serverstarter-2.1.1.jar ]; then
echo "Skipping download. Using existing serverstarter-2.1.1.jar"
java -jar serverstarter-2.1.1.jar
if [[ $DO_RAMDISK -eq 1 ]]; then
sudo umount $SAVE_DIR
rm -rf $SAVE_DIR
mv "${SAVE_DIR}_backup" $SAVE_DIR
fi
exit 0
else
export URL="https://github.com/TeamAOF/ServerStarter/releases/download/v2.1.1/serverstarter-2.1.1.jar"
fi
echo $URL
which wget >> /dev/null
if [ $? -eq 0 ]; then
echo "DEBUG: (wget) Downloading ${URL}"
wget -O serverstarter-2.1.1.jar "${URL}"
else
which curl >> /dev/null
if [ $? -eq 0 ]; then
echo "DEBUG: (curl) Downloading ${URL}"
curl -o serverstarter-2.1.1.jar "${URL}"
else
echo "Neither wget or curl were found on your system. Please install one and try again"
fi
fi
java -jar serverstarter-2.1.1.jar
if [[ $DO_RAMDISK -eq 1 ]]; then
sudo umount $SAVE_DIR
Expand Down