Skip to content

Commit

Permalink
🐛 fix(server): Remove xargs from startup.sh (#73)
Browse files Browse the repository at this point in the history
## Description

**What issue are you solving (or what feature are you adding) and how
are you doing it?**

fix startup.sh by ryan himself
  • Loading branch information
pure5665 authored May 31, 2024
1 parent 3fed860 commit 705f953
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions .scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
sudo -E /usr/bin/supervisord -c /etc/supervisord.conf

0 comments on commit 705f953

Please sign in to comment.