mirror of
https://gitlab.com/2009scape/singleplayer/windows.git
synced 2026-08-01 14:39:18 -06:00
update gitignore, add linux launch script
This commit is contained in:
parent
89140083b7
commit
f89947f604
2 changed files with 37 additions and 0 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -1,2 +1,9 @@
|
|||
**/.idea
|
||||
db/data
|
||||
|
||||
game/data/global_kill_stats.json
|
||||
game/data/eco/grandexchange.db
|
||||
|
||||
game/data/logs/
|
||||
game/data/players/
|
||||
game/data/serverstore/
|
||||
|
|
|
|||
30
launch.sh
Executable file
30
launch.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export _JAVA_OPTIONS=
|
||||
SCRIPT_DIR=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)
|
||||
|
||||
lsof -i:43595
|
||||
|
||||
if [ $? -ne 1 ]; then
|
||||
echo "Something is already listening on port 43595. Cannot start the server."
|
||||
exit
|
||||
fi
|
||||
|
||||
cd $SCRIPT_DIR/game
|
||||
java -jar -Xmx2G -Xms2G -jar server.jar &
|
||||
SERVER_PID=$!
|
||||
|
||||
lsof -i:43595
|
||||
while [ $? -eq 1 ]; do
|
||||
lsof -i:43595
|
||||
echo "Still waiting for the server to start..."
|
||||
sleep 2
|
||||
done;
|
||||
|
||||
java -Xmx1G -Xms1G -jar client.jar &
|
||||
CLIENT_PID=$!
|
||||
|
||||
wait $CLIENT_PID
|
||||
kill $SERVER_PID
|
||||
exit
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue