From 60af119bb9d382b16cc2ee1c74cde927462abd96 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 15 Jan 2021 08:59:35 +1100 Subject: [PATCH] Move xtrn into xtrn orig --- Dockerfile | 1 + init | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7f399a7..929fe22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,7 @@ RUN apt-get update \ && rm -rf /opt/sbbs/3rdp /opt/sbbs/src \ && mv /opt/sbbs/ctrl /opt/sbbs/ctrl.orig \ && mv /opt/sbbs/text /opt/sbbs/text.orig \ + && mv /opt/sbbs/xtrn /opt/sbbs/xtrn.orig \ && mkdir /opt/sbbs/nodes.orig && mv /opt/sbbs/node[1-5] /opt/sbbs/nodes.orig \ && find /opt/sbbs -name CVS -type d -exec rm -rf {} + \ && SUDO_FORCE_REMOVE=yes apt-get -y purge git build-essential libnspr4-dev libncurses5-dev libncursesw5-dev cvs wget pkgconf libcap2-bin sudo \ diff --git a/init b/init index ba5b1f1..7980bbe 100755 --- a/init +++ b/init @@ -20,6 +20,12 @@ if [ ! -e "${SBBSCTRL}/../text/answer.msg" ]; then cp -Ras ${SBBSCTRL}/../text.orig/* ${SBBSCTRL}/../text/ fi +if [ ! -d "${SBBSCTRL}/../xtrn" -o $((ls -1 ${SBBSCTRL}/../xtrn 2>/dev/null|wc -l)||echo 0) -eq 0 ]; then + echo "* Installing SBBS xtrn files into ${SBBSCTRL}/../xtrn" + [ ! -d ${SBBSCTRL}/../xtrn ] && mkdir ${SBBSCTRL}/../xtrn + cp -Ras ${SBBSCTRL}/../xtrn.orig/* ${SBBSCTRL}/../xtrn +fi + if [ -x /usr/sbin/zerotier-one -a -n "${ENABLE_ZT}" ]; then echo "* Starting ZeroTier" mkdir /dev/net && mknod /dev/net/tun -m 666 c 10 200