Move stop-script to buildpack

This commit is contained in:
mathias 2019-02-23 20:26:34 +02:00
parent 979c6d2e46
commit 0a206a17bc
5 changed files with 10 additions and 7 deletions

View file

@ -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/

View file

@ -1,3 +1,3 @@
#!/bin/bash
#!/bin/sh
echo "Kaboom"
exit 0

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
cat <<EOF
---
default_process_types:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
echo "$REMOTE_KEY" > .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"

2
bin/stop Normal file
View file

@ -0,0 +1,2 @@
#!/bin/sh
kill -9 $(pgrep java)