1
0
Fork 0
mirror of https://github.com/Luzifer/rust-server.git synced 2024-11-09 16:10:03 +00:00
rust-server/start.sh

17 lines
429 B
Bash
Raw Normal View History

#!/bin/bash
set -euxo pipefail
# Copy default rustserver script from Linux Game Server Managers when not present
[ -e /home/rustserver/rustserver ] || {
cp /opt/rustserver /home/rustserver/rustserver
chmod 0755 /home/rustserver/rustserver
}
/home/rustserver/rustserver "$@"
set +x
# Keep Docker container running until gameserver process is not longer available
while (pgrep RustDedicated >/dev/null 2>&1); do
sleep 1
done