mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 14:21:18 +00:00

Renamed main container to web. Added the STEAMAPIKEY environment variable placeholder, as this is necessary when searching for mods. Refactor locations of scripts and paths. Rename start scripts to be more consistent with their new locations. Run the web server under nodemon to prevent manual restarting.
26 lines
697 B
Bash
Executable file
26 lines
697 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# A generic script that retrieves XML files from mods, either upstream in remote endpoints, or
|
|
# locally from the downloaded mod directory
|
|
|
|
set -eE
|
|
|
|
ID=${1}
|
|
|
|
source ${FILES}/mods/${ID}/xml.env
|
|
|
|
# Iterate over the file names we can handle
|
|
for var in CFGEVENTSPAWNS CFGSPAWNABLETYPES EVENTS TYPES
|
|
do
|
|
if echo ${!var} | grep -q http
|
|
then
|
|
OUT="${WORKSHOP_DIR}/${ID}/${var,,}.xml"
|
|
echo "${var} is a URL, downloading to ${OUT}"
|
|
curl -so ${OUT} ${!var}
|
|
xmllint --noout ${OUT} 2> /dev/null || {
|
|
echo -e "${red}${var,,}.xml does not pass XML lint test!${default}"
|
|
} && {
|
|
echo -e "${green}${var,,}.xml passes XML lint test!${default}"
|
|
}
|
|
fi
|
|
done
|