From 705f953e6693070d156d427dceddbb63c2908bec Mon Sep 17 00:00:00 2001 From: pure <64907372+pure5665@users.noreply.github.com> Date: Sat, 1 Jun 2024 00:39:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(server):=20Remove=20`xargs`?= =?UTF-8?q?=20from=20startup.sh=20(#73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description **What issue are you solving (or what feature are you adding) and how are you doing it?** fix startup.sh by ryan himself --- .scripts/startup.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.scripts/startup.sh b/.scripts/startup.sh index 2ecb9dff..7e02b4e0 100644 --- a/.scripts/startup.sh +++ b/.scripts/startup.sh @@ -4,21 +4,10 @@ if [ -z "$SESSION_ID" ]; then echo "Error: SESSION_ID environment variable is not set." exit 1 fi - -xarg="$*" - -if [ -z "$xarg" ]; then - echo "Error: No command specified to run the game. Exiting." - exit 1 -fi - + #Open udp port to listed for QUIC events on export PORT=${PORT:-"8080"} -escaped_xarg=$(printf '%s\n' "$xarg" | sed -e 's/[\/&]/\\&/g') - -sudo sed -i "s|^command.*=.*$|command=bash -c \"$escaped_xarg\"|" /etc/supervisord.d/game.ini - sudo sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisord.d/game.ini -sudo -E /usr/bin/supervisord -c /etc/supervisord.conf \ No newline at end of file +sudo -E /usr/bin/supervisord -c /etc/supervisord.conf