Skip to content

Commit

Permalink
added backup before update
Browse files Browse the repository at this point in the history
  • Loading branch information
simylein committed Dec 16, 2020
1 parent 94e8971 commit b229a47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ if screen -list | grep -q "${servername}"; then
screen -S ${servername} -X quit
fi

# create backup
echo -e "${blue}backing up...${nocolor}"
cp -r ${serverdirectory}/world ${backupdirectory}/update-${newdaily}-${newhourly}


# Test internet connectivity and update on success
wget --spider --quiet https://launcher.mojang.com/v1/objects/35139deedbd5182953cf1caa23835da59ca3d7cd/server.jar
if [ "$?" != 0 ]; then
Expand Down

0 comments on commit b229a47

Please sign in to comment.