diff --git a/bin/compile b/bin/compile index a3b923d..99ef5df 100755 --- a/bin/compile +++ b/bin/compile @@ -1,5 +1,6 @@ -#!/bin/bash +#!/bin/sh BIN_DIR="$(cd "$(dirname "$0")" && pwd)" BUILD_DIR=$1 mv $BIN_DIR/start $BUILD_DIR/ +mv $BIN_DIR/stop $BUILD_DIR/ diff --git a/bin/detect b/bin/detect index 379e77a..b78d81d 100755 --- a/bin/detect +++ b/bin/detect @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh echo "Kaboom" exit 0 diff --git a/bin/release b/bin/release index d7d18e0..556581b 100755 --- a/bin/release +++ b/bin/release @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh cat < .ssh/remote echo "$SYNC_KEY" > .ssh/id_rsa chmod 600 .ssh/remote @@ -11,17 +11,17 @@ chmod -R 500 dumps/ plugins/bStats/ plugins/PluginMetrics/ plugins/ProtocolLib/ git clone git@notabug.org:kaboom/schematics.git plugins/WorldEdit/schematics/ -./tmux new -d -s server 'while true; do +tmux/bin/tmux new -d -s server 'while true; do java/bin/java -Xmx384M -Xss512k -Xaggressive -Xdisablejavadump -Xnoagent -Xquickstart -Xshareclasses -XX:MaxDirectMemorySize=384M -XX:-HeapDumpOnOutOfMemoryError -XX:+IdleTuningGcOnIdle -XX:+UseContainerSupport -Dcom.mojang.eula.agree=true -jar minecraft-server.jar --world-dir=worlds sleep 1 done' -./tmux new -d -s remote 'while true; do +tmux/bin/tmux new -d -s remote 'while true; do ssh -i ~/.ssh/remote -o Compression=no -o ExitOnForwardFailure=yes -o StreamLocalBindUnlink=yes -c aes128-gcm@openssh.com -S none -N -T -R 64518:localhost:25565 serv@play.kaboom.pw sleep 1 done' -./tmux new -d -s schematics 'while true; do +tmux/bin/tmux new -d -s schematics 'while true; do cd $HOME/plugins/WorldEdit/schematics/ if [ "$(git add $(git ls-files -o) -v)" ]; then git -c user.name='kaboom' -c user.email='kaboom' commit -m "Add new schematics" diff --git a/bin/stop b/bin/stop new file mode 100644 index 0000000..5b027c0 --- /dev/null +++ b/bin/stop @@ -0,0 +1,2 @@ +#!/bin/sh +kill -9 $(pgrep java)