-
-
Notifications
You must be signed in to change notification settings - Fork 174
/
revert.sh
18 lines (15 loc) · 832 Bytes
/
revert.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# Minecraft Server Permissions Fix Script - James A. Chambers - https://jamesachambers.com/minecraft-bedrock-edition-ubuntu-dedicated-server-guide/
# Set version in version_pin.txt
# Reverts version pinning if you set a custom version to avoid updates being out of sync with Microsoft's servers
# Removing this file will enable automatic updates again
# Set path variable
USERPATH="pathvariable"
PathLength=${#USERPATH}
if [[ "$PathLength" -gt 12 ]]; then
PATH="$USERPATH"
else
echo "Unable to set path variable. You likely need to download an updated version of SetupMinecraft.sh from GitHub!"
fi
ls -r1 dirname/minecraftbe/servername/downloads/ | grep bedrock-server | head -2 | tail -1 >version_pin.txt
echo "Set previous version in version_pin.txt: $(cat dirname/minecraftbe/servername/version_pin.txt)"