dayzdockerserver/files/bin/install.sh
Daniel Ceregatti 8db515313b Add mod search.
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.
2023-05-25 17:32:58 -07:00

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