style: format shell scripts

This commit is contained in:
darksaid98 committed 2025-09-16 16:53:11 +02:00
1 parent 65f79fe387
commit c410367d3b
17 files changed
+62 -78

No files matched your search

+4 -1
View File
@@ -30,7 +30,10 @@ echo -e "${YELLOW}:/home/container${NC} ${MODIFIED_STARTUP}"
echo -e "${BLUE}-------------------------------------------------${NC}" echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${YELLOW}starting MongoDB...${NC}" echo -e "${YELLOW}starting MongoDB...${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}" echo -e "${BLUE}-------------------------------------------------${NC}"
mongod --fork --dbpath /home/container/mongodb/ --port 27017 --logpath /home/container/mongod.log --logRotate reopen --logappend && until nc -z -v -w5 127.0.0.1 27017; do echo 'Waiting for mongodb connection...'; sleep 5; done mongod --fork --dbpath /home/container/mongodb/ --port 27017 --logpath /home/container/mongod.log --logRotate reopen --logappend && until nc -z -v -w5 127.0.0.1 27017; do
echo 'Waiting for mongodb connection...'
sleep 5
done
# Run the Server # Run the Server
echo -e "${BLUE}-------------------------------------------------${NC}" echo -e "${BLUE}-------------------------------------------------${NC}"
+1 -1
View File
@@ -6,7 +6,7 @@ INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP export INTERNAL_IP
# Replace Startup Variables # Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` MODIFIED_STARTUP=$(eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
echo ":/home/container$ ${MODIFIED_STARTUP}" echo ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server # Run the Server
+1 -2
View File
@@ -5,9 +5,8 @@ cd /home/container
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP export INTERNAL_IP
# Replace Startup Variables # Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` MODIFIED_STARTUP=$(eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
echo ":/home/container$ ${MODIFIED_STARTUP}" echo ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server # Run the Server
+1 -2
View File
@@ -2,8 +2,7 @@
cd /home/container cd /home/container
# Make internal Docker IP address available to processes. # Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'` export INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
# Replace Startup Variables # Replace Startup Variables
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
+1 -3
View File
@@ -15,10 +15,8 @@ cd /home/container || exit 1
printf "\033[1m\033[33mcontainer@pelican~ \033[0mjava -version\n" printf "\033[1m\033[33mcontainer@pelican~ \033[0mjava -version\n"
java -version java -version
# Print Python version # Print Python version
if command -v python &> /dev/null if command -v python &>/dev/null; then
then
printf "\033[1m\033[33mcontainer@pelican~ \033[0mpython --version\n" printf "\033[1m\033[33mcontainer@pelican~ \033[0mpython --version\n"
python --version python --version
else else
+19 -26
View File
@@ -36,11 +36,11 @@ function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id]
fi fi
updateAttempt=0 updateAttempt=0
while (( $updateAttempt < $STEAMCMD_ATTEMPTS )); do # Loop for specified number of attempts while (($updateAttempt < $STEAMCMD_ATTEMPTS)); do # Loop for specified number of attempts
# Increment attempt counter # Increment attempt counter
updateAttempt=$((updateAttempt+1)) updateAttempt=$((updateAttempt + 1))
if (( $updateAttempt > 1 )); then # Notify if not first attempt if (($updateAttempt > 1)); then # Notify if not first attempt
echo -e "\t${YELLOW}Re-Attempting download/update in 3 seconds...${NC} (Attempt ${CYAN}${updateAttempt}${NC} of ${CYAN}${STEAMCMD_ATTEMPTS}${NC})\n" echo -e "\t${YELLOW}Re-Attempting download/update in 3 seconds...${NC} (Attempt ${CYAN}${updateAttempt}${NC} of ${CYAN}${STEAMCMD_ATTEMPTS}${NC})\n"
sleep 3 sleep 3
fi fi
@@ -125,7 +125,7 @@ function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id]
cp $file ./keys/optional_$2_${filename} cp $file ./keys/optional_$2_${filename}
done; done
echo -e "\tMod with ID $2 is an optional mod. Deleting original mod download folder..." echo -e "\tMod with ID $2 is an optional mod. Deleting original mod download folder..."
rm -r ./@$2 rm -r ./@$2
@@ -137,7 +137,7 @@ function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id]
fi fi
break break
fi fi
if (( $updateAttempt == $STEAMCMD_ATTEMPTS )); then # Notify if failed last attempt if (($updateAttempt == $STEAMCMD_ATTEMPTS)); then # Notify if failed last attempt
if [[ $1 == 0 ]]; then # Server if [[ $1 == 0 ]]; then # Server
echo -e "\t${RED}Final attempt made! ${YELLOW}Unable to complete game server update. ${CYAN}Skipping...${NC}" echo -e "\t${RED}Final attempt made! ${YELLOW}Unable to complete game server update. ${CYAN}Skipping...${NC}"
echo -e "\t(Please try again at a later time)" echo -e "\t(Please try again at a later time)"
@@ -154,11 +154,9 @@ function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id]
# Takes a directory (string) as input, and recursively makes all files & folders lowercase. # Takes a directory (string) as input, and recursively makes all files & folders lowercase.
function ModsLowercase { function ModsLowercase {
echo -e "\n\tMaking mod ${CYAN}$1${NC} files/folders lowercase..." echo -e "\n\tMaking mod ${CYAN}$1${NC} files/folders lowercase..."
for SRC in `find ./$1 -depth` for SRC in $(find ./$1 -depth); do
do DST=$(dirname "${SRC}")/$(basename "${SRC}" | tr '[A-Z]' '[a-z]')
DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'` if [ "${SRC}" != "${DST}" ]; then
if [ "${SRC}" != "${DST}" ]
then
[ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" [ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}"
fi fi
done done
@@ -255,8 +253,7 @@ if [[ ${UPDATE_SERVER} == 1 ]]; then
## Update mods ## Update mods
if [[ -n $allMods ]] && [[ ${DISABLE_MOD_UPDATES} != 1 ]]; then if [[ -n $allMods ]] && [[ ${DISABLE_MOD_UPDATES} != 1 ]]; then
echo -e "\n${GREEN}[UPDATE]:${NC} Checking all ${CYAN}Steam Workshop mods${NC} for updates..." echo -e "\n${GREEN}[UPDATE]:${NC} Checking all ${CYAN}Steam Workshop mods${NC} for updates..."
for modID in $(echo $allMods | sed -e 's/@//g') for modID in $(echo $allMods | sed -e 's/@//g'); do
do
if [[ $modID =~ ^[0-9]+$ ]]; then # Only check mods that are in ID-form if [[ $modID =~ ^[0-9]+$ ]]; then # Only check mods that are in ID-form
# If a mod is defined in OPTIONALMODS, and is not defined in CLIENT_MODS or SERVERMODS, then treat as an optional mod # If a mod is defined in OPTIONALMODS, and is not defined in CLIENT_MODS or SERVERMODS, then treat as an optional mod
# Optional mods are given a different directory which is checked to see if a new update is available. This is to ensure # Optional mods are given a different directory which is checked to see if a new update is available. This is to ensure
@@ -273,7 +270,7 @@ if [[ ${UPDATE_SERVER} == 1 ]]; then
latestUpdate=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep '<p id=' | head -1 | cut -d'"' -f2) latestUpdate=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep '<p id=' | head -1 | cut -d'"' -f2)
# If the update time is valid and newer than the local directory's creation date, or the mod hasn't been downloaded yet, download the mod # If the update time is valid and newer than the local directory's creation date, or the mod hasn't been downloaded yet, download the mod
if [[ ! -d $modDir ]] || [[ ( -n $latestUpdate ) && ( $latestUpdate =~ ^[0-9]+$ ) && ( $latestUpdate > $(find $modDir | head -1 | xargs stat -c%Y) ) ]]; then if [[ ! -d $modDir ]] || [[ (-n $latestUpdate) && ($latestUpdate =~ ^[0-9]+$) && ($latestUpdate > $(find $modDir | head -1 | xargs stat -c%Y)) ]]; then
# Get the mod's name from the Workshop page as well # Get the mod's name from the Workshop page as well
modName=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep 'workshopItemTitle' | cut -d'>' -f2 | cut -d'<' -f1) modName=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep 'workshopItemTitle' | cut -d'>' -f2 | cut -d'<' -f1)
if [[ -z $modName ]]; then # Set default name if unavailable if [[ -z $modName ]]; then # Set default name if unavailable
@@ -319,10 +316,10 @@ if [[ ${UPDATE_SERVER} == 1 ]]; then
# Delete the optional mod .bikey file and directory # Delete the optional mod .bikey file and directory
rm ${keyFile} rm ${keyFile}
rmdir ./@${modID}_optional 2> /dev/null rmdir ./@${modID}_optional 2>/dev/null
fi fi
fi fi
done; done
echo -e "${GREEN}[UPDATE]:${NC} Steam Workshop mod update check ${GREEN}complete${NC}!" echo -e "${GREEN}[UPDATE]:${NC} Steam Workshop mod update check ${GREEN}complete${NC}!"
fi fi
@@ -340,8 +337,7 @@ fi
# Make mods lowercase, if specified # Make mods lowercase, if specified
if [[ ${MODS_LOWERCASE} == "1" ]]; then if [[ ${MODS_LOWERCASE} == "1" ]]; then
for modDir in $allMods for modDir in $allMods; do
do
ModsLowercase $modDir ModsLowercase $modDir
done done
fi fi
@@ -355,8 +351,7 @@ mkdir -p /home/container/serverprofile/rpt
# Clear HC cache, if specified # Clear HC cache, if specified
if [[ ${CLEAR_CACHE} == "1" ]]; then if [[ ${CLEAR_CACHE} == "1" ]]; then
echo -e "\n${GREEN}[STARTUP]: ${CYAN}Clearing Headless Client profiles cache...${NC}" echo -e "\n${GREEN}[STARTUP]: ${CYAN}Clearing Headless Client profiles cache...${NC}"
for profileDir in ./serverprofile/home/* for profileDir in ./serverprofile/home/*; do
do
[ "$profileDir" = "./serverprofile/home/Player" ] && continue [ "$profileDir" = "./serverprofile/home/Player" ] && continue
rm -rf $profileDir rm -rf $profileDir
done done
@@ -372,7 +367,7 @@ fi
# Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile) # Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile)
export USER_ID=$(id -u) export USER_ID=$(id -u)
export GROUP_ID=$(id -g) export GROUP_ID=$(id -g)
envsubst < /passwd.template > ${NSS_WRAPPER_PASSWD} envsubst </passwd.template >${NSS_WRAPPER_PASSWD}
if [[ ${SERVER_BINARY} == *"x64"* ]]; then # Check which libnss-wrapper architecture to run, based off the server binary name if [[ ${SERVER_BINARY} == *"x64"* ]]; then # Check which libnss-wrapper architecture to run, based off the server binary name
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so
@@ -381,16 +376,14 @@ else
fi fi
# Replace Startup Variables # Replace Startup Variables
modifiedStartup=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` modifiedStartup=$(eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
# Start Headless Clients if applicable # Start Headless Clients if applicable
if [[ ${HC_NUM} > 0 ]]; then if [[ ${HC_NUM} > 0 ]]; then
echo -e "\n${GREEN}[STARTUP]:${NC} Starting ${CYAN}${HC_NUM}${NC} Headless Client(s)." echo -e "\n${GREEN}[STARTUP]:${NC} Starting ${CYAN}${HC_NUM}${NC} Headless Client(s)."
for i in $(seq ${HC_NUM}) for i in $(seq ${HC_NUM}); do
do if [[ ${HC_HIDE} == "1" ]]; then
if [[ ${HC_HIDE} == "1" ]]; ./${SERVER_BINARY} -client -connect=127.0.0.1 -port=${SERVER_PORT} -password="${SERVER_PASSWORD}" -profiles=./serverprofile -bepath=./battleye -mod="${CLIENT_MODS}" ${STARTUP_PARAMS} >/dev/null 2>&1 &
then
./${SERVER_BINARY} -client -connect=127.0.0.1 -port=${SERVER_PORT} -password="${SERVER_PASSWORD}" -profiles=./serverprofile -bepath=./battleye -mod="${CLIENT_MODS}" ${STARTUP_PARAMS} > /dev/null 2>&1 &
else else
./${SERVER_BINARY} -client -connect=127.0.0.1 -port=${SERVER_PORT} -password="${SERVER_PASSWORD}" -profiles=./serverprofile -bepath=./battleye -mod="${CLIENT_MODS}" ${STARTUP_PARAMS} & ./${SERVER_BINARY} -client -connect=127.0.0.1 -port=${SERVER_PORT} -password="${SERVER_PASSWORD}" -profiles=./serverprofile -bepath=./battleye -mod="${CLIENT_MODS}" ${STARTUP_PARAMS} &
fi fi
+12 -16
View File
@@ -35,11 +35,11 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id]
fi fi
updateAttempt=0 updateAttempt=0
while (( $updateAttempt < $STEAMCMD_ATTEMPTS )); do # Loop for specified number of attempts while (($updateAttempt < $STEAMCMD_ATTEMPTS)); do # Loop for specified number of attempts
# Increment attempt counter # Increment attempt counter
updateAttempt=$((updateAttempt+1)) updateAttempt=$((updateAttempt + 1))
if (( $updateAttempt > 1 )); then # Notify if not first attempt if (($updateAttempt > 1)); then # Notify if not first attempt
echo -e "\t${YELLOW}Re-Attempting download/update in 3 seconds...${NC} (Attempt ${CYAN}${updateAttempt}${NC} of ${CYAN}${STEAMCMD_ATTEMPTS}${NC})\n" echo -e "\t${YELLOW}Re-Attempting download/update in 3 seconds...${NC} (Attempt ${CYAN}${updateAttempt}${NC} of ${CYAN}${STEAMCMD_ATTEMPTS}${NC})\n"
sleep 3 sleep 3
fi fi
@@ -116,7 +116,7 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id]
fi fi
break break
fi fi
if (( $updateAttempt == $STEAMCMD_ATTEMPTS )); then # Notify if failed last attempt if (($updateAttempt == $STEAMCMD_ATTEMPTS)); then # Notify if failed last attempt
if [[ $1 == 0 ]]; then # Server if [[ $1 == 0 ]]; then # Server
echo -e "\t${RED}Final attempt made! ${YELLOW}Unable to complete game server update. ${CYAN}Skipping...${NC}" echo -e "\t${RED}Final attempt made! ${YELLOW}Unable to complete game server update. ${CYAN}Skipping...${NC}"
echo -e "\t(Please try again at a later time)" echo -e "\t(Please try again at a later time)"
@@ -133,11 +133,9 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id]
# Takes a directory (string) as input, and recursively makes all files & folders lowercase. # Takes a directory (string) as input, and recursively makes all files & folders lowercase.
function ModsLowercase { function ModsLowercase {
echo -e "\n\tMaking mod ${CYAN}$1${NC} files/folders lowercase..." echo -e "\n\tMaking mod ${CYAN}$1${NC} files/folders lowercase..."
for SRC in `find ./$1 -depth` for SRC in $(find ./$1 -depth); do
do DST=$(dirname "${SRC}")/$(basename "${SRC}" | tr '[A-Z]' '[a-z]')
DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'` if [ "${SRC}" != "${DST}" ]; then
if [ "${SRC}" != "${DST}" ]
then
[ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" [ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}"
fi fi
done done
@@ -219,13 +217,12 @@ if [[ ${UPDATE_SERVER} == 1 ]]; then
## Update mods ## Update mods
if [[ -n $allMods ]] && [[ ${DISABLE_MOD_UPDATES} != 1 ]]; then if [[ -n $allMods ]] && [[ ${DISABLE_MOD_UPDATES} != 1 ]]; then
echo -e "\n${GREEN}[UPDATE]:${NC} Checking all ${CYAN}Steam Workshop mods${NC} for updates..." echo -e "\n${GREEN}[UPDATE]:${NC} Checking all ${CYAN}Steam Workshop mods${NC} for updates..."
for modID in $(echo $allMods | sed -e 's/@//g') for modID in $(echo $allMods | sed -e 's/@//g'); do
do
if [[ $modID =~ ^[0-9]+$ ]]; then # Only check mods that are in ID-form if [[ $modID =~ ^[0-9]+$ ]]; then # Only check mods that are in ID-form
# Get mod's latest update in epoch time from its Steam Workshop changelog page # Get mod's latest update in epoch time from its Steam Workshop changelog page
latestUpdate=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep '<p id=' | head -1 | cut -d'"' -f2) latestUpdate=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep '<p id=' | head -1 | cut -d'"' -f2)
# If the update time is valid and newer than the local directory's creation date, or the mod hasn't been downloaded yet, download the mod # If the update time is valid and newer than the local directory's creation date, or the mod hasn't been downloaded yet, download the mod
if [[ ! -d @$modID ]] || [[ ( -n $latestUpdate ) && ( $latestUpdate =~ ^[0-9]+$ ) && ( $latestUpdate > $(find @$modID | head -1 | xargs stat -c%Y) ) ]]; then if [[ ! -d @$modID ]] || [[ (-n $latestUpdate) && ($latestUpdate =~ ^[0-9]+$) && ($latestUpdate > $(find @$modID | head -1 | xargs stat -c%Y)) ]]; then
# Get the mod's name from the Workshop page as well # Get the mod's name from the Workshop page as well
modName=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep 'workshopItemTitle' | cut -d'>' -f2 | cut -d'<' -f1) modName=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep 'workshopItemTitle' | cut -d'>' -f2 | cut -d'<' -f1)
if [[ -z $modName ]]; then # Set default name if unavailable if [[ -z $modName ]]; then # Set default name if unavailable
@@ -265,8 +262,7 @@ fi
# Make mods lowercase, if specified # Make mods lowercase, if specified
if [[ ${MODS_LOWERCASE} == "1" ]]; then if [[ ${MODS_LOWERCASE} == "1" ]]; then
for modDir in $allMods for modDir in $allMods; do
do
ModsLowercase $modDir ModsLowercase $modDir
done done
fi fi
@@ -274,11 +270,11 @@ fi
# Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile) # Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile)
export USER_ID=$(id -u) export USER_ID=$(id -u)
export GROUP_ID=$(id -g) export GROUP_ID=$(id -g)
envsubst < /passwd.template > ${NSS_WRAPPER_PASSWD} envsubst </passwd.template >${NSS_WRAPPER_PASSWD}
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so
# Replace Startup Variables # Replace Startup Variables
modifiedStartup=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` modifiedStartup=$(eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
# Start the Server # Start the Server
echo -e "\n${GREEN}[STARTUP]:${NC} Starting server with the following startup command:" echo -e "\n${GREEN}[STARTUP]:${NC} Starting server with the following startup command:"
+1 -1
View File
@@ -5,7 +5,7 @@ cd /home/container
if [ "${GIT_ENABLED}" == "true" ] || [ "${GIT_ENABLED}" == "1" ]; then if [ "${GIT_ENABLED}" == "true" ] || [ "${GIT_ENABLED}" == "1" ]; then
# Pre git stuff # Pre git stuff
echo "Wait, preparing to pull or clone from git."; echo "Wait, preparing to pull or clone from git."
mkdir -p /home/container/resources mkdir -p /home/container/resources
cd /home/container/resources cd /home/container/resources
+4 -4
View File
@@ -2,18 +2,18 @@
cd /home/container cd /home/container
# Make internal Docker IP address available to processes. # Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'` export INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
## if auto_update is not set or to 1 update ## if auto_update is not set or to 1 update
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
# Allow for the staging branch to also update itself # Allow for the staging branch to also update itself
./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) +quit ./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 $([[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}") $([[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}") +quit
else 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
# Replace Startup Variables # Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` MODIFIED_STARTUP=$(eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
echo ":/home/container$ ${MODIFIED_STARTUP}" echo ":/home/container$ ${MODIFIED_STARTUP}"
if [[ "${FRAMEWORK}" == "carbon" ]]; then if [[ "${FRAMEWORK}" == "carbon" ]]; then
@@ -34,7 +34,7 @@ elif [[ "${FRAMEWORK}" == "oxide-staging" ]]; then
elif [[ "$OXIDE" == "1" ]] || [[ "${FRAMEWORK}" == "oxide" ]]; then elif [[ "$OXIDE" == "1" ]] || [[ "${FRAMEWORK}" == "oxide" ]]; then
# Oxide: https://github.com/OxideMod/Oxide.Rust # Oxide: https://github.com/OxideMod/Oxide.Rust
echo "Updating uMod..." echo "Updating uMod..."
curl -sSL "https://github.com/OxideMod/Oxide.Rust/releases/latest/download/Oxide.Rust-linux.zip" > umod.zip curl -sSL "https://github.com/OxideMod/Oxide.Rust/releases/latest/download/Oxide.Rust-linux.zip" >umod.zip
unzip -o -q umod.zip unzip -o -q umod.zip
rm umod.zip rm umod.zip
echo "Done updating uMod!" echo "Done updating uMod!"
+1 -1
View File
@@ -2,7 +2,7 @@
cd /home/container cd /home/container
# Make internal Docker IP address available to processes. # Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'` export INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
# Replace Startup Variables # Replace Startup Variables
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
+2 -3
View File
@@ -36,7 +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
## just in case someone removed the defaults. ## just in case someone removed the defaults.
if [ "${STEAM_USER}" == "" ]; then if [ "${STEAM_USER}" == "" ]; then
echo -e "steam user is not set.\n" echo -e "steam user is not set.\n"
@@ -53,9 +52,9 @@ if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
# Update Source Server # Update Source Server
if [ ! -z ${SRCDS_APPID} ]; then if [ ! -z ${SRCDS_APPID} ]; then
if [ "${STEAM_USER}" == "anonymous" ]; then if [ "${STEAM_USER}" == "anonymous" ]; then
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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 1007 +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
numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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 numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $([[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows') +app_update 1007 +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
fi fi
else else
echo -e "No appid set. Starting Server" echo -e "No appid set. Starting Server"
+2 -4
View File
@@ -5,7 +5,6 @@ cd /home/container
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP export INTERNAL_IP
## just in case someone removed the defaults. ## just in case someone removed the defaults.
if [ "${STEAM_USER}" == "" ]; then if [ "${STEAM_USER}" == "" ]; then
echo -e "steam user is not set.\n" echo -e "steam user is not set.\n"
@@ -21,7 +20,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} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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 1007 +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
@@ -30,11 +29,10 @@ 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
# Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile) # Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile)
export USER_ID=$(id -u) export USER_ID=$(id -u)
export GROUP_ID=$(id -g) export GROUP_ID=$(id -g)
envsubst < /passwd.template > ${NSS_WRAPPER_PASSWD} envsubst </passwd.template >${NSS_WRAPPER_PASSWD}
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so
+2 -3
View File
@@ -30,9 +30,9 @@ if [ ! -z "${SRCDS_APPID}" ]; then
# Update Source Server # Update Source Server
if [ ! -z ${SRCDS_APPID} ]; then if [ ! -z ${SRCDS_APPID} ]; then
if [ "${STEAM_USER}" == "anonymous" ]; then if [ "${STEAM_USER}" == "anonymous" ]; then
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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 1007 +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
numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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 numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $([[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows') +app_update 1007 +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
fi fi
else else
echo -e "No appid set. Starting Server" echo -e "No appid set. Starting Server"
@@ -43,7 +43,6 @@ if [ ! -z "${SRCDS_APPID}" ]; then
fi fi
fi fi
# Replace Startup Variables # Replace Startup Variables
MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
echo -e ":/home/container$ ${MODIFIED_STARTUP}" echo -e ":/home/container$ ${MODIFIED_STARTUP}"
+1 -1
View File
@@ -9,7 +9,7 @@ INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP export INTERNAL_IP
# Replace Startup Variables # Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` MODIFIED_STARTUP=$(eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
echo ":/home/container$ ${MODIFIED_STARTUP}" echo ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server # Run the Server
+2 -2
View File
@@ -69,9 +69,9 @@ if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
# Update Source Server # Update Source Server
if [ ! -z ${SRCDS_APPID} ]; then if [ ! -z ${SRCDS_APPID} ]; then
if [ "${STEAM_USER}" == "anonymous" ]; then if [ "${STEAM_USER}" == "anonymous" ]; then
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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}" ) ${INSTALL_FLAGS} $( [[ "${VALIDATE}" == "1" ]] && 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 1007 +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}") ${INSTALL_FLAGS} $([[ "${VALIDATE}" == "1" ]] && printf %s 'validate') +quit
else else
numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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}" ) ${INSTALL_FLAGS} $( [[ "${VALIDATE}" == "1" ]] && printf %s 'validate' ) +quit numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $([[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows') +app_update 1007 +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}") ${INSTALL_FLAGS} $([[ "${VALIDATE}" == "1" ]] && printf %s 'validate') +quit
fi fi
else else
echo -e "No appid set. Starting Server" echo -e "No appid set. Starting Server"
+4 -4
View File
@@ -9,7 +9,7 @@ log() {
echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" | tee -a $LOGFILE echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" | tee -a $LOGFILE
} }
install_dep(){ install_dep() {
log "Installing dependencies..." log "Installing dependencies..."
apt update && apt -y install \ apt update && apt -y install \
build-essential \ build-essential \
@@ -73,7 +73,7 @@ install_arm64_multilib() {
log "Multilib ARM64 installed successfully" log "Multilib ARM64 installed successfully"
} }
clone_mumble(){ clone_mumble() {
log "Cloning the Mumble repository..." log "Cloning the Mumble repository..."
# Create the necessary directories # Create the necessary directories
@@ -105,7 +105,7 @@ clone_mumble(){
# Create and navigate to the build directory # Create and navigate to the build directory
mkdir -p build && cd build mkdir -p build && cd build
echo "$LATEST_TAG" > latest_tag.txt echo "$LATEST_TAG" >latest_tag.txt
# Run cmake with the specified options # Run cmake with the specified options
cmake -Dbundled-opus=OFF -Dclient=OFF -Dstatic=ON -DCMAKE_BUILD_TYPE=Release .. cmake -Dbundled-opus=OFF -Dclient=OFF -Dstatic=ON -DCMAKE_BUILD_TYPE=Release ..
@@ -117,7 +117,7 @@ clone_mumble(){
log "Repository cloned and configured successfully" log "Repository cloned and configured successfully"
} }
build_mumble(){ build_mumble() {
log "Building Mumble server..." log "Building Mumble server..."
cd /usr/src/mumble/git/build cd /usr/src/mumble/git/build
+4 -4
View File
@@ -26,9 +26,9 @@ if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
# Update Source Server # Update Source Server
if [ ! -z ${SRCDS_APPID} ]; then if [ ! -z ${SRCDS_APPID} ]; then
if [ "${STEAM_USER}" == "anonymous" ]; then if [ "${STEAM_USER}" == "anonymous" ]; then
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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 1007 +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
numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +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 numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $([[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows') +app_update 1007 +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
fi fi
else else
echo -e "No appid set. Starting Server" echo -e "No appid set. Starting Server"
@@ -50,7 +50,7 @@ mkdir -p $WINEPREFIX
# Check if wine-gecko required and install it if so # Check if wine-gecko required and install it if so
if [[ $WINETRICKS_RUN =~ gecko ]]; then if [[ $WINETRICKS_RUN =~ gecko ]]; then
echo "Installing Gecko" echo "Installing Gecko"
WINETRICKS_RUN=${WINETRICKS_RUN/gecko} WINETRICKS_RUN=${WINETRICKS_RUN/gecko/}
if [ ! -f "$WINEPREFIX/gecko_x86.msi" ]; then if [ ! -f "$WINEPREFIX/gecko_x86.msi" ]; then
wget -q -O $WINEPREFIX/gecko_x86.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86.msi wget -q -O $WINEPREFIX/gecko_x86.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86.msi
@@ -67,7 +67,7 @@ fi
# Check if wine-mono required and install it if so # Check if wine-mono required and install it if so
if [[ $WINETRICKS_RUN =~ mono ]]; then if [[ $WINETRICKS_RUN =~ mono ]]; then
echo "Installing mono" echo "Installing mono"
WINETRICKS_RUN=${WINETRICKS_RUN/mono} WINETRICKS_RUN=${WINETRICKS_RUN/mono/}
if [ ! -f "$WINEPREFIX/mono.msi" ]; then if [ ! -f "$WINEPREFIX/mono.msi" ]; then
wget -q -O $WINEPREFIX/mono.msi https://dl.winehq.org/wine/wine-mono/9.1.0/wine-mono-9.1.0-x86.msi wget -q -O $WINEPREFIX/mono.msi https://dl.winehq.org/wine/wine-mono/9.1.0/wine-mono-9.1.0-x86.msi