mirror of
https://github.com/Luzifer/rust-server.git
synced 2024-11-09 16:10:03 +00:00
16 lines
429 B
Bash
Executable file
16 lines
429 B
Bash
Executable file
#!/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
|