From 788bc1aa2a9ebee8ba3ef19f1156438ca30a083d Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 4 Jan 2022 16:12:14 +0200 Subject: [PATCH] add --- .../usr/share/swarmlab.io/sec/custom/custom.sh | 1 + .../share/swarmlab.io/sec/custom/extrapackages | 0 install/usr/share/swarmlab.io/sec/custom/setup.sh | 15 +++++++++++++++ install/usr/share/swarmlab.io/sec/swarmlab-sec | 15 +++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 install/usr/share/swarmlab.io/sec/custom/custom.sh create mode 100644 install/usr/share/swarmlab.io/sec/custom/extrapackages create mode 100755 install/usr/share/swarmlab.io/sec/custom/setup.sh diff --git a/install/usr/share/swarmlab.io/sec/custom/custom.sh b/install/usr/share/swarmlab.io/sec/custom/custom.sh new file mode 100644 index 0000000..1a24852 --- /dev/null +++ b/install/usr/share/swarmlab.io/sec/custom/custom.sh @@ -0,0 +1 @@ +#!/bin/sh diff --git a/install/usr/share/swarmlab.io/sec/custom/extrapackages b/install/usr/share/swarmlab.io/sec/custom/extrapackages new file mode 100644 index 0000000..e69de29 diff --git a/install/usr/share/swarmlab.io/sec/custom/setup.sh b/install/usr/share/swarmlab.io/sec/custom/setup.sh new file mode 100755 index 0000000..0577c93 --- /dev/null +++ b/install/usr/share/swarmlab.io/sec/custom/setup.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +echo "==> extra packages" + +extrap=/tmp/bin/extrapackages +if [ -f $extrap ]; then +sh $extrap +fi + +echo "==> exec custom" + +extrashell=/tmp/bin/custom.sh +if [ -f $extrashell ]; then +sh $extrashell +fi diff --git a/install/usr/share/swarmlab.io/sec/swarmlab-sec b/install/usr/share/swarmlab.io/sec/swarmlab-sec index 3663d88..706a08e 100755 --- a/install/usr/share/swarmlab.io/sec/swarmlab-sec +++ b/install/usr/share/swarmlab.io/sec/swarmlab-sec @@ -171,6 +171,13 @@ if [ -d "$Wdir/project" ]; then && chown -R \${USER1}:\${USER1} \${SSHDIR} \ && chown -R \${USER1}:\${USER1} \${USER_HOME} + + + COPY custom /tmp/bin + RUN /tmp/bin/setup.sh + + + #WORKDIR /home/docker/project WORKDIR /var/www/html COPY .vimrc /home/docker @@ -257,6 +264,13 @@ if [ "$Wdir" == "$HOME" ]; then && chown -R \${USER1}:\${USER1} \${SSHDIR} \ && chown -R \${USER1}:\${USER1} \${USER_HOME} + + + COPY custom /tmp/bin + RUN /tmp/bin/setup.sh + + + COPY .vimrc /home/docker #WORKDIR /home/docker/project WORKDIR /var/www/html @@ -279,6 +293,7 @@ fi /bin/cp -rf $DIR/.vimrc $Wdir/.vimrc /bin/cp -rf $DIR/bin $Wdir /bin/cp -rf $DIR/install-vim-plugin.sh $Wdir/install-vim-plugin.sh +/bin/cp -rf $DIR/custom $Wdir cat << EOF > $Wdir/docker-compose.yml