Compare commits

..

No commits in common. "7ff7cf204898ae6bfc455b689d8be54cc15b1ea4" and "9521ded2425b85577cdbe9f4e718993297cc61ee" have entirely different histories.

20 changed files with 22 additions and 124 deletions

View file

@ -73,9 +73,10 @@ prompt_yn(){
fi
}
# List mods. Highlight the ones that are active when run from the server script.
# List mods
list(){
X=1
C="${green}"
spaces=" "
FIRST=1
for link in $(ls -d ${SERVER_FILES}/@* 2> /dev/null | sort)
@ -90,11 +91,6 @@ list(){
ID=$(readlink ${link} | awk -F/ '{print $NF}')
MODNAME=$(get_mod_name ${ID})
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}
X=$((X+1))
done
@ -175,24 +171,14 @@ get_mods(){
get_mod_command_line(){
mod_command_line=""
server_command_line=""
for link in $(ls -tdr ${SERVER_PROFILE}/@* 2> /dev/null)
do
ID=$(readlink ${link} | awk -F/ '{print $NF}')
MODNAME=$(get_mod_name ${ID})
if grep -q SERVER_MOD ${FILES}/mods/${ID}/xml.env 2> /dev/null
then
server_command_line+="@${MODNAME};"
else
mod_command_line+="@${MODNAME};"
fi
mod_command_line+="@${MODNAME};"
done
if [[ ${mod_command_line} != "" ]]
then
mod_command_line='-mod='${mod_command_line::-1}
fi
if [[ ${server_command_line} != "" ]]
then
server_command_line='-serverMod='${server_command_line::-1}
fi
}

View file

@ -1,2 +0,0 @@
TYPES=./XMLS/types\ \(NOT\ A\ REPLACE\).xml
SPAWNABLETYPES=./XMLS/a2_spawnabletypes.xml

View file

@ -1,2 +0,0 @@
TYPES=./Info/Centraleconomy/Morty_ce/Morty_types.xml
CFGSPAWNABLETYPES=./Info/Centraleconomy/Morty_ce/Morty_cfgspawnabletypes.xml

View file

@ -1 +0,0 @@
TYPES=./Types/types.xml

View file

@ -1,69 +0,0 @@
# 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

View file

@ -1 +0,0 @@
SERVER_MOD=1

View file

@ -1 +0,0 @@
SERVER_MOD=1

View file

@ -1,2 +0,0 @@
TYPES=./Files/Types_Alien.xml
EVENTS./Files/events.xml

View file

@ -1 +0,0 @@
2300143806

View file

@ -1 +0,0 @@
2874589934

View file

@ -1 +0,0 @@
2881635033

View file

@ -1 +0,0 @@
2155726353

View file

@ -1 +0,0 @@
1793351435

View file

@ -1 +0,0 @@
3017273820

View file

@ -1 +0,0 @@
2517480838

View file

@ -24,11 +24,6 @@ RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-reco
wget \
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
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8

View file

@ -27,7 +27,6 @@ then
fi
mod_command_line=""
server_command_line=""
# Functions
@ -112,7 +111,7 @@ report() {
then
exit 0
fi
rm -f /tmp/mod_command_line /tmp/server_command_line /tmp/parameters
rm -f /tmp/mod_command_line /tmp/parameters
echo
echo -e "${yellow}========================================== error.log =========================================="
find "${SERVER_PROFILE}" -name error.log -exec head {} \; -exec tail -n 30 {} \; -exec rm -f {} \;
@ -413,7 +412,6 @@ start(){
# 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
echo ${mod_command_line} > /tmp/mod_command_line
echo ${server_command_line} > /tmp/server_command_line
echo ${parameters} > /tmp/parameters
# Add the steam port from the environment
cp -a "${SERVER_CFG_SAVE}" "${SERVER_CFG_DST}"
@ -421,7 +419,7 @@ start(){
then
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
fi
./DayZServer "${mod_command_line}" "${server_command_line}" ${parameters}
./DayZServer "${mod_command_line}" ${parameters}
EXIT_CODE=$?
printf "\n[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"
report
@ -518,6 +516,7 @@ activate(){
echo -e "Mod id ${ID} - ${COLOR}${MODNAME}${default} ${WW}activated"
popd > /dev/null
done
status
}
# List mods
@ -561,6 +560,7 @@ status(){
loadconfig
INSTALLED="${NO}"
RUNNING="${NO}"
# DayZ Server files installation
if [ -f "${SERVER_INSTALL_FILE}" ]
then
@ -574,10 +574,10 @@ status(){
F=$(date +%s -r /tmp/parameters)
DAYS=$(( (${D} - ${F}) / 86400 ))
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}"
# Current parameters
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}"
RUNNING="${RUNNING}\nRunning Parameters: $(cat /tmp/parameters)\nRunning mod parameter: $(cat /tmp/mod_command_line)"
fi
# Release or Experimental
if [[ ${release_client_appid} = "221100" ]]
@ -590,7 +590,8 @@ status(){
# Map
MAP=${MAP}
# Number of mods plus the list denoting on or off
echo -ne "Server files installed: ${INSTALLED}"
echo -ne "
Server files installed: ${INSTALLED}"
if [[ "${INSTALLED}" = "${NO}" ]]
then
echo
@ -600,16 +601,15 @@ status(){
get_mods
echo -ne "
Active mods: "
activelist
activelist
echo -e "${MODS}
Server running: ${RUNNING}
Working parameters: ${yellow}${parameters}${default}
Working mod parameter: ${yellow}${mod_command_line}${default}
Working server parameter: ${yellow}${server_command_line}${default}"
Working parameters: ${parameters}
Working mod parameter: ${mod_command_line}"
if [[ "${INSTALLED}" = "${YES}" ]]
then
echo -e "Map: ${green}${MAP}${default}"
echo -e "Version: ${green}${VERSION}${default}"
echo "Map: ${MAP}"
echo "Version: ${VERSION}"
fi
echo
}

View file

@ -4,7 +4,6 @@
cat > .bashrc <<EOF
alias ls='ls --color'
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-server:\w\$ "
export TERM=screen.xterm-256color
unset DEVELOPMENT
EOF

View file

@ -65,7 +65,7 @@ RUN groupadd -g ${USER_ID} user && \
# Shut steamcmd up
RUN cd /usr/lib/i386-linux-gnu && ln -s /web/bin/steamservice.so
# Add bercon-cli https://github.com/WoozyMasta/bercon
# Add bercon 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

View file

@ -1,12 +1,15 @@
#!/usr/bin/env bash
# Set PS1 so we know we're in the container
cat > .bashrc <<EOF
if ! echo .bashrc | grep -q "dz-web"
then
echo "Adding PS1 to .bashrc..."
cat > .bashrc <<EOF
alias ls='ls --color'
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-web:\w\$ "
export TERM=screen.xterm-256color
unset DEVELOPMENT
EOF
fi
# Shut steamcmd up
if ! [ -d ${HOME}/.steam ]