Skip to content

Commit

Permalink
Merge pull request #19 from quarno/master
Browse files Browse the repository at this point in the history
Refractoring
  • Loading branch information
calloatti authored Sep 1, 2019
2 parents 0d4ab1d + c952056 commit 3a49084
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
34 changes: 21 additions & 13 deletions server/_install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

INSTALLER_VERSION="0.5.0.33"
MC_VERSION="1.14.4"
Expand All @@ -21,18 +21,26 @@ else
echo "fabric-server-launch.jar and server.jar found"
fi

echo "#!/bin/sh" > start.sh
echo "java -Xms2499M -Xmx2500M -jar fabric-server-launch.jar" nogui >> start.sh
echo 'read -n1 -r -p "Press any key to continue..."' >> start.sh

echo "#!/bin/sh" > start_autorestart.sh
echo "while true" >> start_autorestart.sh
echo "do" >> start_autorestart.sh
echo "java -Xms2499M -Xmx2500M -jar fabric-server-launch.jar" nogui >> start_autorestart.sh
echo 'echo "Crashed? Restarting in 10 seconds..."' >> start_autorestart.sh
echo "sleep 10" >> start_autorestart.sh
echo "done" >> start_autorestart.sh
echo 'read -n1 -r -p "Press any key to continue..."' >> start_autorestart.sh
cat > start.sh <<EOF
#!/bin/sh
java -Xms2499M -Xmx2500M -jar fabric-server-launch.jar nogui
read -n1 -r -p "Press any key to continue..."
EOF

cat > start_autorestart.sh <<EOF
#!/bin/sh
while true
do
java -Xms2499M -Xmx2500M -jar fabric-server-launch.jar nogui
echo "Crashed? Restarting in 10 seconds..."
sleep 10
done
read -n1 -r -p "Press any key to continue..."
EOF

echo "eula=true" > eula.txt

Expand Down
3 changes: 2 additions & 1 deletion server/_install_mods.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash

cd "$(dirname "$0")" || exit
mkdir -p mods || exit
cd mods || exit
Expand Down

0 comments on commit 3a49084

Please sign in to comment.