Merge remote-tracking branch 'parkervcp/master'
This commit is contained in:
@@ -36,10 +36,6 @@ export INTERNAL_IP
|
|||||||
# Switch to the container's working directory
|
# Switch to the container's working directory
|
||||||
cd /home/container || exit 1
|
cd /home/container || exit 1
|
||||||
|
|
||||||
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
|
|
||||||
# variable format of "${VARIABLE}" before evaluating the string and automatically
|
|
||||||
# replacing the values.
|
|
||||||
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
|
|
||||||
|
|
||||||
## just in case someone removed the defaults.
|
## just in case someone removed the defaults.
|
||||||
if [ "${STEAM_USER}" == "" ]; then
|
if [ "${STEAM_USER}" == "" ]; then
|
||||||
@@ -56,7 +52,7 @@ fi
|
|||||||
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
|
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
|
||||||
# Update Source Server
|
# Update Source Server
|
||||||
if [ ! -z ${SRCDS_APPID} ]; then
|
if [ ! -z ${SRCDS_APPID} ]; then
|
||||||
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
|
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
|
||||||
else
|
else
|
||||||
echo -e "No appid set. Starting Server"
|
echo -e "No appid set. Starting Server"
|
||||||
fi
|
fi
|
||||||
@@ -65,8 +61,9 @@ else
|
|||||||
echo -e "Not updating game server as auto update was set to 0. Starting Server"
|
echo -e "Not updating game server as auto update was set to 0. Starting Server"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Display the command we're running in the output, and then execute it with the env
|
# Replace Startup Variables
|
||||||
# from the container itself.
|
MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||||
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED"
|
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
|
||||||
# shellcheck disable=SC2086
|
|
||||||
exec env ${PARSED}
|
# Run the Server
|
||||||
|
eval ${MODIFIED_STARTUP}
|
||||||
|
Reference in New Issue
Block a user