Add mods support in docker image. - Change Ark server Tools branch to 1.4-dev

This commit is contained in:
TuRz4m 2015-10-23 11:15:44 +02:00
parent 7d0081598c
commit 8efb3b23af
4 changed files with 57 additions and 20 deletions

View file

@ -22,7 +22,7 @@ ENV AUTOUPDATE -1
# Nb minute between auto backup (-1 : no auto backup)
ENV AUTOBACKUP -1
# branch on github for ark server tools
ENV BRANCH master
ENV BRANCH 1.4-dev
# Server PORT (you can't remap with docker, it doesn't work)
ENV SERVERPORT 27015
# Steam port (you can't remap with docker, it doesn't work)
@ -32,6 +32,10 @@ ENV STEAMPORT 7778
RUN apt-get update &&\
apt-get install -y curl lib32gcc1 lsof git
# Enable passwordless sudo for users under the "sudo" group
RUN sed -i.bkp -e \
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers \
/etc/sudoers
# Run commands as the steam user
RUN adduser \
@ -39,6 +43,8 @@ RUN adduser \
--shell /bin/bash \
--gecos "" \
steam
# Add to sudo group
RUN usermod -a -G sudo steam
# Copy & rights to folders
COPY run.sh /home/steam/run.sh

View file

@ -1,6 +1,10 @@
# --- SYSTEM CONFIG - DO NOT TOUCH ---#
arkstChannel=${BRANCH} # change it to a different branch to get non-stable versions
install_bindir="/usr/bin"
install_libexecdir="/usr/libexec/arkmanager"
install_datadir="/usr/share/arkmanager"
# config SteamCMD
steamcmdroot="/home/steam/steamcmd" # path of your steamcmd instance
@ -11,8 +15,9 @@ steamcmd_appinfocache="/home/steam/Steam/appcache/appinfo.vdf" # cache of t
# config environment
arkserverroot="/ark/server" # path of your ARK server files (default ~/ARK)
arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of ARK server executable
arkbackupdir="/ark/backup" # path to backup directory
arkwarnminutes="30" # number of minutes to warn players when using update --warn
arkbackupdir="/ark/backup" # path to backup directory
arkwarnminutes="30" # number of minutes to warn players when using update --warn
arkautorestartfile="ShooterGame/Saved/.autorestart" # path to autorestart file
# config Service
servicename="arkserv" # Name of the service (don't change if you don't know what are you doing)

View file

@ -2,8 +2,33 @@
# ARK server options - use ark_<optionname>=<value>
# comment out these values if you want to define them
# inside your GameUserSettings.ini file
serverMap=${SERVERMAP} # server map (default TheIsland)
serverMap=${SERVERMAP} # server map (default TheIsland)
ark_SessionName=${SESSIONNAME} # if your session name needs special characters please use the .ini instead
ark_ServerPassword=${SERVERPASSWORD} # ARK server password, empty: no password required to login
ark_ServerAdminPassword=${ADMINPASSWORD} # ARK server admin password, KEEP IT SAFE!
ark_MaxPlayers=${NBPLAYER}
ark_ServerPassword=${SERVERPASSWORD} # ARK server password, empty: no password required to login
ark_ServerAdminPassword=${ADMINPASSWORD} # ARK server admin password, KEEP IT SAFE!
ark_MaxPlayers=${NBPLAYER} # Number MAX of player
# ark_bRawSockets="" # Uncomment if you want to use ark raw socket (instead of steam p2p) [Not recommended]
arkflag_log=""
# ----- Mods ----- #
#ark_GameModIds="487516323,487516324,487516325" # Uncomment to specify additional mods by Mod Id separated by commas
# Mod OS Selection
mod_branch=Windows
# Add mod-specific OS selection below:
#mod_branch_496735411=Windows
# ----------------#
# ARK server flags - use arkflag_<optionname>=true
#arkflag_OnlyAdminRejoinAsSpectator=true # Uncomment to only allow admins to rejoin as spectator
#arkflag_DisableDeathSpectator=true # Uncomment to disable players from becoming spectators when they die
# ARK server options - i.e. for -optname=val, use arkopt_optname=val
#arkopt_StructureDestructionTag=DestroySwampSnowStructures
# Update warning messages
# Modify as desired, putting the %d replacement operator where the number belongs
msgWarnUpdateMinutes="This ARK server will shutdown for an update in %d minutes"
msgWarnUpdateSeconds="This ARK server will shutdown for an update in %d seconds"
arkBackupPreUpdate="false" # set this to true if you want to perform a backup before updating

27
run.sh
View file

@ -11,25 +11,26 @@ export TERM=linux
[ ! -d /ark/log ] && mkdir /ark/log
[ ! -d /ark/backup ] && mkdir /ark/backup
# Remove auto-upgrade since we need priviled access
# With 1.4, we will use the user install and allow auto upgrade
#echo "Upgrade Ark server tools..."
#arkmanager upgrade
arkmanager upgrade-tools
if [ ! -d "/ark/server" ];then
if [ ! -d "/ark/server" ] && [ ! -f "/ark/server/arkversion" ];then
echo "Install ark..."
arkmanager install
fi
# Create mod dir
mkdir /ark/server/ShooterGame/Content/Mods
else
if [ ${BACKUPONSTART} -eq 1 ]; then
echo "[Backup]"
arkmanager backup
fi
if [ ${BACKUPONSTART} -eq 1 ]; then
echo "[Backup]"
arkmanager backup
fi
if [ ${UPDATEONSTART} -eq 1 ]; then
echo "[Update]"
arkmanager update
if [ ${UPDATEONSTART} -eq 1 ]; then
echo "[Update]"
arkmanager update --update-mods
fi
fi
# Launching ark server
@ -43,7 +44,7 @@ trap 'arkmanager stop' TERM
# Auto update every $AUTOUPDATE minutes
if [ $AUTOUPDATE -gt 0 ]; then
while :; do sleep $(($AUTOUPDATE * 60)); echo "[`date +'%y/%m/%d %H:%M'`] [Auto-Update]"; arkmanager update --warn ; done &
while :; do sleep $(($AUTOUPDATE * 60)); echo "[`date +'%y/%m/%d %H:%M'`] [Auto-Update]"; arkmanager update --warn --update-mods --backup ; done &
fi
# Auto backup every $AUTOBACKUP minutes