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.
30 lines
659 B
Bash
Executable file
30 lines
659 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eE
|
|
|
|
source /files/mods/${1}/install.env
|
|
|
|
echo
|
|
if [[ ${2} = "uninstall" ]]
|
|
then
|
|
echo "Backing up, as uninstalling will remove the ${MAP} mpmissions directory"
|
|
dayzserver backup
|
|
echo "Uninstalling mpmissions..."
|
|
echo
|
|
rm -rf ${SERVER_FILES}/mpmissions/${MPDIR}
|
|
elif [[ ${2} = "update" ]]
|
|
then
|
|
echo "Updating mpmissions directory..."
|
|
echo
|
|
cd /tmp
|
|
git clone ${REPO} 2> /dev/null 1> /dev/null
|
|
cp -a ${DIR}/${MPDIR} ${SERVER_FILES}/mpmissions
|
|
rm -rf ${DIR}
|
|
else
|
|
echo "Installing mpmissions files..."
|
|
echo
|
|
cd /tmp
|
|
git clone ${REPO} 2> /dev/null 1> /dev/null
|
|
cp -a ${DIR}/${MPDIR} ${SERVER_FILES}/mpmissions
|
|
rm -rf ${DIR}
|
|
fi
|