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

Make development work by setting an environment variable. Set the web container to restart instead of not, should the express server crash. Copy XML files that are merged when the server starts only when the mpmissions directory exists. Refactor XML functions for better naming. Handle display of lists when no mods are installed. Add support for adding mpmissions for Deer Isle and mpmissions in general via mod integrations. Add support for Red Falcon Watercraft XML files. WIP. Add a deer isle DayZ bicycle spawn file.
30 lines
651 B
Bash
Executable file
30 lines
651 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eE
|
|
|
|
if [ -f /files/mods/${1}/install.env ]
|
|
then
|
|
source /files/mods/${1}/install.env
|
|
else
|
|
echo "install.env not found for mod id ${1}..."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ${2} = "uninstall" ]]
|
|
then
|
|
echo "Backing up, as uninstalling will remove the ${MAP} mpmissions directory"
|
|
dz backup
|
|
rm -rf ${SERVER_FILES}/mpmissions/${MPDIR}
|
|
elif [[ ${2} = "update" ]]
|
|
then
|
|
cd /tmp
|
|
git clone ${REPO} 2> /dev/null 1> /dev/null
|
|
cp -a ${DIR}/${MPDIR} ${SERVER_FILES}/mpmissions
|
|
rm -rf ${DIR}
|
|
elif [[ ${2} = "install" ]]
|
|
then
|
|
cd /tmp
|
|
git clone ${REPO} 2> /dev/null 1> /dev/null
|
|
cp -a ${DIR}/${MPDIR} ${SERVER_FILES}/mpmissions
|
|
rm -rf ${DIR}
|
|
fi
|