-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ jobs: | |
- interstellarrift | ||
- longvinter | ||
- mohaa | ||
- quakeliveqlx | ||
- riskofrain2 | ||
- samp | ||
- screeps | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,6 @@ jobs: | |
- ubuntu | ||
- parker | ||
- notini | ||
- python39 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/bin/bash | ||
|
||
clear | ||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
YELLOW='\033[1;33m' | ||
BLUE='\033[0;34m' | ||
NC='\033[0m' | ||
|
||
# Wait for the container to fully initialize | ||
sleep 1 | ||
|
||
# Default the TZ environment variable to UTC. | ||
TZ=${TZ:-UTC} | ||
export TZ | ||
|
||
# Set environment variable that holds the Internal Docker IP | ||
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') | ||
export INTERNAL_IP | ||
|
||
# Information output | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
echo -e "${RED}SteamCMD Image by gOOvER${NC}" | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
echo -e "${YELLOW}Running on Debian: ${RED} $(cat /etc/debian_version)${NC}" | ||
echo -e "${YELLOW}Current timezone: ${RED} $(cat /etc/timezone)${NC}" | ||
echo -e "${YELLOW}DotNet Version: ${RED} $(dotnet --version) ${NC}" | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
|
||
# Switch to the container's working directory | ||
cd /home/container || exit 1 | ||
|
||
# writing dotnet infos to file | ||
#dotnetinfo=$(dotnet --info) | ||
#echo $dotnetinfo >| dotnet_info.txt | ||
|
||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
echo -e "${GREEN}Starting Server.... Please wait...${NC}" | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
|
||
## just in case someone removed the defaults. | ||
if [ "${STEAM_USER}" == "" ]; then | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
echo -e "${YELLOW}Steam user is not set. ${NC}" | ||
echo -e "${YELLOW}Using anonymous user.${NC}" | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
STEAM_USER=anonymous | ||
STEAM_PASS="" | ||
STEAM_AUTH="" | ||
else | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
echo -e "${YELLOW}user set to ${STEAM_USER} ${NC}" | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
fi | ||
|
||
## if auto_update is not set or to 1 update | ||
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then | ||
# Update Source Server | ||
if [ ! -z ${SRCDS_APPID} ]; 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' ) $( [[ "${STEAM_SDK}" == "1" ]] && printf %s '+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 | ||
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 ${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 | ||
else | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
echo -e "${YELLOW}No appid set. Starting Server${NC}" | ||
echo -e "${BLUE}-------------------------------------------------${NC}" | ||
fi | ||
|
||
else | ||
echo -e "${BLUE}---------------------------------------------------------------${NC}" | ||
echo -e "${YELLOW}Not updating game server as auto update was set to 0. Starting Server${NC}" | ||
echo -e "${BLUE}---------------------------------------------------------------${NC}" | ||
fi | ||
|
||
# Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile) | ||
export USER_ID=$(id -u) | ||
export GROUP_ID=$(id -g) | ||
envsubst < /passwd.template > ${NSS_WRAPPER_PASSWD} | ||
|
||
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so | ||
|
||
# Replace Startup Variables | ||
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') | ||
echo -e ":/home/container$ ${MODIFIED_STARTUP}" | ||
|
||
# Run the Server | ||
eval ${MODIFIED_STARTUP} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
root:x:0:0:root:/root:/bin/bash | ||
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin | ||
bin:x:2:2:bin:/bin:/usr/sbin/nologin | ||
sys:x:3:3:sys:/dev:/usr/sbin/nologin | ||
sync:x:4:65534:sync:/bin:/bin/sync | ||
games:x:5:60:games:/usr/games:/usr/sbin/nologin | ||
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin | ||
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin | ||
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin | ||
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin | ||
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin | ||
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin | ||
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin | ||
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin | ||
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin | ||
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin | ||
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin | ||
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin | ||
systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false | ||
systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false | ||
systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false | ||
systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false | ||
syslog:x:104:108::/home/syslog:/bin/false | ||
messagebus:x:106:109::/var/run/dbus:/bin/false | ||
bind:x:108:112::/var/cache/bind:/bin/false | ||
${USER_NAME}:x:${USER_ID}:${GROUP_ID}:${USER_NAME}:${HOME}:/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
deb http://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware | ||
# deb-src http://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware | ||
|
||
deb http://deb.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware | ||
# deb-src http://deb.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware | ||
|
||
deb http://deb.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware | ||
# deb-src http://deb.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware | ||
|
||
deb http://deb.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware | ||
# deb-src http://deb.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware | ||
|
||
deb http://deb.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware | ||
# deb-src http://deb.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware |