mirror of
https://github.com/AsgardEternal/SquadDocker.git
synced 2024-09-28 11:44:22 -05:00
feat: use bash fork instead of tmux for multiple jobs
This commit is contained in:
parent
9ca4b62c30
commit
94f4f81deb
@ -103,8 +103,7 @@ RUN <<__EOR__
|
||||
apt-get update
|
||||
apt-get install -y --no-install-suggests --no-install-recommends \
|
||||
yarn \
|
||||
nodejs \
|
||||
tmux=3.1c-1+deb11u1
|
||||
nodejs
|
||||
|
||||
rm -rf /var/lib/apt/lists/* /root/prepare-node14-yarn.bash
|
||||
|
||||
|
@ -30,19 +30,15 @@ main() {
|
||||
done < "${SQUAD_SERVER_DIR}/SquadGame/ServerConfig/Rcon.cfg" > "rcon.temp" && mv "rcon.temp" "${SQUAD_SERVER_DIR}/SquadGame/ServerConfig/Rcon.cfg"
|
||||
|
||||
printf "Starting the Squad Server....\n"
|
||||
su "${USER}" << __EOC__
|
||||
tmux new-session -d -s "Squad-Server" \
|
||||
"${SQUAD_SERVER_DIR}/SquadGameServer.sh" \
|
||||
su "${USER}" - "${SQUAD_SERVER_DIR}/SquadGameServer.sh" \
|
||||
Port="${GAMEPORT}" \
|
||||
QueryPort="${QUERYPORT}" \
|
||||
FIXEDMAXTICKRATE="${FIXEDMAXTICKRATE}" \
|
||||
FIXEDMAXPLAYERS="${FIXEDMAXPLAYERS}" &&
|
||||
printf "Started the Squad Server\n"
|
||||
FIXEDMAXPLAYERS="${FIXEDMAXPLAYERS}" && exit "${?}" &
|
||||
|
||||
printf "Starting SquadJS...\n"
|
||||
sleep 5
|
||||
node "${USER_HOME}/SquadJS/index.js"
|
||||
su "${USER}" - /usr/bin/node "${SQUADJS_DIR}/index.js" &
|
||||
|
||||
wait
|
||||
__EOC__
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user