diff --git a/Dockerfile b/Dockerfile index 2519f91..3222987 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ RUN echo 'deb http://deb.debian.org/debian bullseye-backports main non-free' >> # Install _only_ the necessary packages RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \ - nano \ curl \ ca-certificates \ + gdb \ git \ jq \ lib32gcc-s1 \ @@ -26,6 +26,7 @@ RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-reco libcap2 \ libxml2-utils \ locales \ + nano \ procps \ python3-pip \ wget \ diff --git a/files/mods/2415195639/install.env b/files/mods/2415195639/install.env new file mode 100755 index 0000000..0e2e69a --- /dev/null +++ b/files/mods/2415195639/install.env @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -eE + +MAP="Banov" +DIR="Banov" +REPO="https://github.com/KubeloLive/${DIR}.git" +MPDIR="empty.banov" diff --git a/files/mods/2415195639/install.sh b/files/mods/2415195639/install.sh deleted file mode 100755 index c282257..0000000 --- a/files/mods/2415195639/install.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -set -eE - -cd "$(dirname ${0})" - -echo -if echo ${0} | grep -q "uninstall.sh" -then - echo "Backing up, as uninstalling will remove the Banov mpmissions directory" - dayzserver backup - echo "Uninstalling mpmissions..." - echo - rm -rf ${HOME}/serverfiles/mpmissions/empty.banov -elif echo ${0} | grep -q "update.sh" -then - echo "Updating mpmissions directory..." - echo - cd /tmp - git clone https://github.com/KubeloLive/Banov 2> /dev/null 1> /dev/null - cp -a Banov/empty.banov ${HOME}/serverfiles/mpmissions - rm -rf Banov -else - echo "Installing mpmissions files..." - echo - cd /tmp - git clone https://github.com/KubeloLive/Banov 2> /dev/null 1> /dev/null - cp -a Banov/empty.banov ${HOME}/serverfiles/mpmissions - rm -rf Banov -fi diff --git a/files/mods/2415195639/uninstall.sh b/files/mods/2415195639/uninstall.sh deleted file mode 120000 index 61e71e2..0000000 --- a/files/mods/2415195639/uninstall.sh +++ /dev/null @@ -1 +0,0 @@ -install.sh \ No newline at end of file diff --git a/files/mods/2415195639/update.sh b/files/mods/2415195639/update.sh deleted file mode 120000 index 61e71e2..0000000 --- a/files/mods/2415195639/update.sh +++ /dev/null @@ -1 +0,0 @@ -install.sh \ No newline at end of file diff --git a/files/mods/2929038098/install.env b/files/mods/2929038098/install.env new file mode 100755 index 0000000..b107384 --- /dev/null +++ b/files/mods/2929038098/install.env @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +MAP="Pripyat" +DIR="PripyatMissionFiles" +REPO="https://github.com/FrenchiestFry15/${DIR}.git" +MPDIR="serverMission.Pripyat" diff --git a/files/mods/@Pripyat b/files/mods/@Pripyat new file mode 120000 index 0000000..26c7a32 --- /dev/null +++ b/files/mods/@Pripyat @@ -0,0 +1 @@ +2929038098 \ No newline at end of file diff --git a/files/mods/install.sh b/files/mods/install.sh new file mode 100755 index 0000000..322d214 --- /dev/null +++ b/files/mods/install.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -eEx + +source /files/mods/${1}/install.env + +echo +if echo ${0} | grep -q "uninstall.sh" +then + echo "Backing up, as uninstalling will remove the ${MAP} mpmissions directory" + dayzserver backup + echo "Uninstalling mpmissions..." + echo + rm -rf ${HOME}/serverfiles/mpmissions/${MPDIR} +elif echo ${0} | grep -q "update.sh" +then + echo "Updating mpmissions directory..." + echo + cd /tmp + git clone ${REPO} 2> /dev/null 1> /dev/null + cp -a ${DIR}/${MPDIR} ${HOME}/serverfiles/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} ${HOME}/serverfiles/mpmissions + rm -rf ${DIR} +fi diff --git a/files/mods/types.sh b/files/mods/types.sh index 6e12a29..d215193 100755 --- a/files/mods/types.sh +++ b/files/mods/types.sh @@ -31,7 +31,7 @@ do else # Add the contents of extras/types.xml to every db/types.xml in all # mission directories - xmllint --noout ${TYPES_FILE} && { + xmllint --noout ${TYPES_FILE} 2> /dev/null && { echo -e "${green}${TYPES_FILE} passes XML lint test!" echo -e "Merging to $file...${default}" # Chop the bottom tag from the destination file @@ -43,7 +43,7 @@ do # Concatenate the two files back into the source file cat /tmp/types-dst.xml /tmp/types-src.xml > /tmp/types.xml - xmllint --noout /tmp/types.xml && { + xmllint --noout /tmp/types.xml 2> /dev/null && { cp -v /tmp/types.xml ${file} } || { # Try again, but chop the top 3 tags, hopefully xml and types, from the source file...