mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-08-10 09:03:32 +00:00
Compare commits
7 commits
9521ded242
...
7ff7cf2048
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7ff7cf2048 | ||
![]() |
0db8acaa65 | ||
![]() |
143a5cf059 | ||
![]() |
d28f698728 | ||
![]() |
386cd4878c | ||
![]() |
a64a61962e | ||
![]() |
1f31cec202 |
20 changed files with 124 additions and 22 deletions
|
@ -73,10 +73,9 @@ prompt_yn(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# List mods
|
# List mods. Highlight the ones that are active when run from the server script.
|
||||||
list(){
|
list(){
|
||||||
X=1
|
X=1
|
||||||
C="${green}"
|
|
||||||
spaces=" "
|
spaces=" "
|
||||||
FIRST=1
|
FIRST=1
|
||||||
for link in $(ls -d ${SERVER_FILES}/@* 2> /dev/null | sort)
|
for link in $(ls -d ${SERVER_FILES}/@* 2> /dev/null | sort)
|
||||||
|
@ -91,6 +90,11 @@ list(){
|
||||||
ID=$(readlink ${link} | awk -F/ '{print $NF}')
|
ID=$(readlink ${link} | awk -F/ '{print $NF}')
|
||||||
MODNAME=$(get_mod_name ${ID})
|
MODNAME=$(get_mod_name ${ID})
|
||||||
SIZE=$(du -sh "${WORKSHOP_DIR}/${ID}" | awk '{print $1}')
|
SIZE=$(du -sh "${WORKSHOP_DIR}/${ID}" | awk '{print $1}')
|
||||||
|
C="${yellow}"
|
||||||
|
if [[ -L ${SERVER_PROFILE}/@${MODNAME} ]]
|
||||||
|
then
|
||||||
|
C="${green}"
|
||||||
|
fi
|
||||||
printf "${C}%.3d %s %.30s %s https://steamcommunity.com/sharedfiles/filedetails/?id=%s %s${default}\n" ${X} ${ID} "${MODNAME}" "${spaces:${#MODNAME}}" ${ID} ${SIZE}
|
printf "${C}%.3d %s %.30s %s https://steamcommunity.com/sharedfiles/filedetails/?id=%s %s${default}\n" ${X} ${ID} "${MODNAME}" "${spaces:${#MODNAME}}" ${ID} ${SIZE}
|
||||||
X=$((X+1))
|
X=$((X+1))
|
||||||
done
|
done
|
||||||
|
@ -171,14 +175,24 @@ get_mods(){
|
||||||
|
|
||||||
get_mod_command_line(){
|
get_mod_command_line(){
|
||||||
mod_command_line=""
|
mod_command_line=""
|
||||||
|
server_command_line=""
|
||||||
for link in $(ls -tdr ${SERVER_PROFILE}/@* 2> /dev/null)
|
for link in $(ls -tdr ${SERVER_PROFILE}/@* 2> /dev/null)
|
||||||
do
|
do
|
||||||
ID=$(readlink ${link} | awk -F/ '{print $NF}')
|
ID=$(readlink ${link} | awk -F/ '{print $NF}')
|
||||||
MODNAME=$(get_mod_name ${ID})
|
MODNAME=$(get_mod_name ${ID})
|
||||||
mod_command_line+="@${MODNAME};"
|
if grep -q SERVER_MOD ${FILES}/mods/${ID}/xml.env 2> /dev/null
|
||||||
|
then
|
||||||
|
server_command_line+="@${MODNAME};"
|
||||||
|
else
|
||||||
|
mod_command_line+="@${MODNAME};"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
if [[ ${mod_command_line} != "" ]]
|
if [[ ${mod_command_line} != "" ]]
|
||||||
then
|
then
|
||||||
mod_command_line='-mod='${mod_command_line::-1}
|
mod_command_line='-mod='${mod_command_line::-1}
|
||||||
fi
|
fi
|
||||||
|
if [[ ${server_command_line} != "" ]]
|
||||||
|
then
|
||||||
|
server_command_line='-serverMod='${server_command_line::-1}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
2
files/mods/1793351435/xml.env
Normal file
2
files/mods/1793351435/xml.env
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
TYPES=./XMLS/types\ \(NOT\ A\ REPLACE\).xml
|
||||||
|
SPAWNABLETYPES=./XMLS/a2_spawnabletypes.xml
|
2
files/mods/2155726353/xml.env
Normal file
2
files/mods/2155726353/xml.env
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
TYPES=./Info/Centraleconomy/Morty_ce/Morty_types.xml
|
||||||
|
CFGSPAWNABLETYPES=./Info/Centraleconomy/Morty_ce/Morty_cfgspawnabletypes.xml
|
1
files/mods/2517480838/xml.env
Normal file
1
files/mods/2517480838/xml.env
Normal file
|
@ -0,0 +1 @@
|
||||||
|
TYPES=./Types/types.xml
|
69
files/mods/2692979668/install.sh
Executable file
69
files/mods/2692979668/install.sh
Executable file
|
@ -0,0 +1,69 @@
|
||||||
|
# Make helicopter parts, clothes, and accessories spawn on the map, as the default is for none to spawn.
|
||||||
|
|
||||||
|
echo "To make Red Falcon Helis parts and accessories spawn on the map, see files/mods/2692979668/install.sh"
|
||||||
|
|
||||||
|
# Comment out (or remove) the line below, and to apply, run: docker compose run --rm server dz x 2692979668
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
echo "Adding Red Falcon Helis parts, clothes, and accessories to world spawns."
|
||||||
|
|
||||||
|
# Aviation fluid
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_hydraulic_fluid']/nominal" --value "20" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Aviation tool box
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_aviation_toolbox']/nominal" --value "7" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Aviation battery
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_aviation_battery']/nominal" --value "7" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Hydraulic hoses
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_hydraulic_hoses']/nominal" --value "5" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Igniter plug
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_igniter_plug']/nominal" --value "3" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Wiring harness
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_wiring_harness']/nominal" --value "5" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Flight case
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_flight_case']/nominal" --value "7" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Flight case red
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_flight_case_red']/nominal" --value "3" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Flight case blue
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_flight_case_blue']/nominal" --value "7" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Aviation battery charger
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_batterycharger']/nominal" --value "5" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Pilot helmet
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_PilotHelmet']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Pilot helmet black
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_PilotHelmet_Black']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Pilot helmet desert
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_PilotHelmet_Desert']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Flag
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_Flag_RedFalcon']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# Hoodie
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_hoodie']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# RFFSHeli_hoodie_black
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_hoodie_black']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# RFFSHeli_PilotGloves
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_PilotGloves']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# RFFSHeli_PilotShirt
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_PilotShirt']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# RFFSHeli_PilotPants
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_PilotPants']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
||||||
|
# RFFSHeli_PilotVest
|
||||||
|
xmlstarlet edit --inplace --update "/types/type[@name='RFFSHeli_PilotVest']/nominal" --value "1" /mods/221100/2692979668/types.xml
|
||||||
|
|
1
files/mods/2874589934/xml.env
Normal file
1
files/mods/2874589934/xml.env
Normal file
|
@ -0,0 +1 @@
|
||||||
|
SERVER_MOD=1
|
1
files/mods/2881635033/xml.env
Normal file
1
files/mods/2881635033/xml.env
Normal file
|
@ -0,0 +1 @@
|
||||||
|
SERVER_MOD=1
|
2
files/mods/3017273820/xml.env
Normal file
2
files/mods/3017273820/xml.env
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
TYPES=./Files/Types_Alien.xml
|
||||||
|
EVENTS./Files/events.xml
|
1
files/mods/@DEADAIRWeaponpackSTALKERAirDevTeam
Symbolic link
1
files/mods/@DEADAIRWeaponpackSTALKERAirDevTeam
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
2300143806
|
1
files/mods/@DayZ-Dynamic-AI-Addon
Symbolic link
1
files/mods/@DayZ-Dynamic-AI-Addon
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
2874589934
|
1
files/mods/@FallFix
Symbolic link
1
files/mods/@FallFix
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
2881635033
|
1
files/mods/@MortysWeapons
Symbolic link
1
files/mods/@MortysWeapons
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
2155726353
|
1
files/mods/@RemasteredArmaWeaponPack
Symbolic link
1
files/mods/@RemasteredArmaWeaponPack
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
1793351435
|
1
files/mods/@ZAlien
Symbolic link
1
files/mods/@ZAlien
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
3017273820
|
1
files/mods/@sfradio
Symbolic link
1
files/mods/@sfradio
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
2517480838
|
|
@ -24,6 +24,11 @@ RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-reco
|
||||||
wget \
|
wget \
|
||||||
xmlstarlet
|
xmlstarlet
|
||||||
|
|
||||||
|
# Add bercon-cli https://github.com/WoozyMasta/bercon
|
||||||
|
RUN wget https://github.com/WoozyMasta/bercon-cli/releases/latest/download/bercon-cli-linux-amd64 -O bercon-cli \
|
||||||
|
&& chmod +x bercon-cli \
|
||||||
|
&& mv bercon-cli /usr/bin
|
||||||
|
|
||||||
# Set the locale
|
# Set the locale
|
||||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
||||||
ENV LANG en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
||||||
|
|
|
@ -27,6 +27,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mod_command_line=""
|
mod_command_line=""
|
||||||
|
server_command_line=""
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
|
@ -111,7 +112,7 @@ report() {
|
||||||
then
|
then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
rm -f /tmp/mod_command_line /tmp/parameters
|
rm -f /tmp/mod_command_line /tmp/server_command_line /tmp/parameters
|
||||||
echo
|
echo
|
||||||
echo -e "${yellow}========================================== error.log =========================================="
|
echo -e "${yellow}========================================== error.log =========================================="
|
||||||
find "${SERVER_PROFILE}" -name error.log -exec head {} \; -exec tail -n 30 {} \; -exec rm -f {} \;
|
find "${SERVER_PROFILE}" -name error.log -exec head {} \; -exec tail -n 30 {} \; -exec rm -f {} \;
|
||||||
|
@ -412,6 +413,7 @@ start(){
|
||||||
# Save the mod command line and parameters that were used to start the server, so status reflects the running server's
|
# Save the mod command line and parameters that were used to start the server, so status reflects the running server's
|
||||||
# actual status with those
|
# actual status with those
|
||||||
echo ${mod_command_line} > /tmp/mod_command_line
|
echo ${mod_command_line} > /tmp/mod_command_line
|
||||||
|
echo ${server_command_line} > /tmp/server_command_line
|
||||||
echo ${parameters} > /tmp/parameters
|
echo ${parameters} > /tmp/parameters
|
||||||
# Add the steam port from the environment
|
# Add the steam port from the environment
|
||||||
cp -a "${SERVER_CFG_SAVE}" "${SERVER_CFG_DST}"
|
cp -a "${SERVER_CFG_SAVE}" "${SERVER_CFG_DST}"
|
||||||
|
@ -419,7 +421,7 @@ start(){
|
||||||
then
|
then
|
||||||
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
|
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
|
||||||
fi
|
fi
|
||||||
./DayZServer "${mod_command_line}" ${parameters}
|
./DayZServer "${mod_command_line}" "${server_command_line}" ${parameters}
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
printf "\n[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"
|
printf "\n[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"
|
||||||
report
|
report
|
||||||
|
@ -516,7 +518,6 @@ activate(){
|
||||||
echo -e "Mod id ${ID} - ${COLOR}${MODNAME}${default} ${WW}activated"
|
echo -e "Mod id ${ID} - ${COLOR}${MODNAME}${default} ${WW}activated"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
done
|
done
|
||||||
status
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# List mods
|
# List mods
|
||||||
|
@ -560,7 +561,6 @@ status(){
|
||||||
loadconfig
|
loadconfig
|
||||||
INSTALLED="${NO}"
|
INSTALLED="${NO}"
|
||||||
RUNNING="${NO}"
|
RUNNING="${NO}"
|
||||||
|
|
||||||
# DayZ Server files installation
|
# DayZ Server files installation
|
||||||
if [ -f "${SERVER_INSTALL_FILE}" ]
|
if [ -f "${SERVER_INSTALL_FILE}" ]
|
||||||
then
|
then
|
||||||
|
@ -574,10 +574,10 @@ status(){
|
||||||
F=$(date +%s -r /tmp/parameters)
|
F=$(date +%s -r /tmp/parameters)
|
||||||
DAYS=$(( (${D} - ${F}) / 86400 ))
|
DAYS=$(( (${D} - ${F}) / 86400 ))
|
||||||
UPTIME="${DAYS} days "$(date -d@$(($(date +%s) - $(date +%s -r /tmp/parameters))) -u +"%H hours %M minutes %S seconds")
|
UPTIME="${DAYS} days "$(date -d@$(($(date +%s) - $(date +%s -r /tmp/parameters))) -u +"%H hours %M minutes %S seconds")
|
||||||
|
|
||||||
RUNNING="${YES}\nUptime: ${green}${UPTIME}${default}"
|
RUNNING="${YES}\nUptime: ${green}${UPTIME}${default}"
|
||||||
# Current parameters
|
# Current parameters
|
||||||
RUNNING="${RUNNING}\nRunning Parameters: $(cat /tmp/parameters)\nRunning mod parameter: $(cat /tmp/mod_command_line)"
|
RUNNING="${RUNNING}\nRunning parameters: ${green}$(cat /tmp/parameters)\nRunning mod parameter: $(cat /tmp/mod_command_line)${default}"
|
||||||
|
RUNNING="${RUNNING}\nRunning server parameter: ${green}$(cat /tmp/server_command_line)${default}"
|
||||||
fi
|
fi
|
||||||
# Release or Experimental
|
# Release or Experimental
|
||||||
if [[ ${release_client_appid} = "221100" ]]
|
if [[ ${release_client_appid} = "221100" ]]
|
||||||
|
@ -590,8 +590,7 @@ status(){
|
||||||
# Map
|
# Map
|
||||||
MAP=${MAP}
|
MAP=${MAP}
|
||||||
# Number of mods plus the list denoting on or off
|
# Number of mods plus the list denoting on or off
|
||||||
echo -ne "
|
echo -ne "Server files installed: ${INSTALLED}"
|
||||||
Server files installed: ${INSTALLED}"
|
|
||||||
if [[ "${INSTALLED}" = "${NO}" ]]
|
if [[ "${INSTALLED}" = "${NO}" ]]
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
|
@ -601,15 +600,16 @@ Server files installed: ${INSTALLED}"
|
||||||
get_mods
|
get_mods
|
||||||
echo -ne "
|
echo -ne "
|
||||||
Active mods: "
|
Active mods: "
|
||||||
activelist
|
activelist
|
||||||
echo -e "${MODS}
|
echo -e "${MODS}
|
||||||
Server running: ${RUNNING}
|
Server running: ${RUNNING}
|
||||||
Working parameters: ${parameters}
|
Working parameters: ${yellow}${parameters}${default}
|
||||||
Working mod parameter: ${mod_command_line}"
|
Working mod parameter: ${yellow}${mod_command_line}${default}
|
||||||
|
Working server parameter: ${yellow}${server_command_line}${default}"
|
||||||
if [[ "${INSTALLED}" = "${YES}" ]]
|
if [[ "${INSTALLED}" = "${YES}" ]]
|
||||||
then
|
then
|
||||||
echo "Map: ${MAP}"
|
echo -e "Map: ${green}${MAP}${default}"
|
||||||
echo "Version: ${VERSION}"
|
echo -e "Version: ${green}${VERSION}${default}"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
cat > .bashrc <<EOF
|
cat > .bashrc <<EOF
|
||||||
alias ls='ls --color'
|
alias ls='ls --color'
|
||||||
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-server:\w\$ "
|
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-server:\w\$ "
|
||||||
|
export TERM=screen.xterm-256color
|
||||||
unset DEVELOPMENT
|
unset DEVELOPMENT
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ RUN groupadd -g ${USER_ID} user && \
|
||||||
# Shut steamcmd up
|
# Shut steamcmd up
|
||||||
RUN cd /usr/lib/i386-linux-gnu && ln -s /web/bin/steamservice.so
|
RUN cd /usr/lib/i386-linux-gnu && ln -s /web/bin/steamservice.so
|
||||||
|
|
||||||
# Add bercon https://github.com/WoozyMasta/bercon
|
# Add bercon-cli https://github.com/WoozyMasta/bercon
|
||||||
RUN wget https://github.com/WoozyMasta/bercon-cli/releases/latest/download/bercon-cli-linux-amd64 -O bercon-cli \
|
RUN wget https://github.com/WoozyMasta/bercon-cli/releases/latest/download/bercon-cli-linux-amd64 -O bercon-cli \
|
||||||
&& chmod +x bercon-cli \
|
&& chmod +x bercon-cli \
|
||||||
&& mv bercon-cli /usr/bin
|
&& mv bercon-cli /usr/bin
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Set PS1 so we know we're in the container
|
# Set PS1 so we know we're in the container
|
||||||
if ! echo .bashrc | grep -q "dz-web"
|
cat > .bashrc <<EOF
|
||||||
then
|
|
||||||
echo "Adding PS1 to .bashrc..."
|
|
||||||
cat > .bashrc <<EOF
|
|
||||||
alias ls='ls --color'
|
alias ls='ls --color'
|
||||||
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-web:\w\$ "
|
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-web:\w\$ "
|
||||||
|
export TERM=screen.xterm-256color
|
||||||
unset DEVELOPMENT
|
unset DEVELOPMENT
|
||||||
EOF
|
EOF
|
||||||
fi
|
|
||||||
|
|
||||||
# Shut steamcmd up
|
# Shut steamcmd up
|
||||||
if ! [ -d ${HOME}/.steam ]
|
if ! [ -d ${HOME}/.steam ]
|
||||||
|
|
Loading…
Add table
Reference in a new issue