From 8246104b83b5828364802731133ccdce410b5f72 Mon Sep 17 00:00:00 2001 From: casjay Date: Thu, 12 Sep 2024 20:26:51 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/root/docker/setup/02-packages.sh rootfs/usr/local/etc/docker/init.d/00-enclosed.sh --- rootfs/root/docker/setup/02-packages.sh | 11 +++++++++-- rootfs/usr/local/etc/docker/init.d/00-enclosed.sh | 3 +-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/rootfs/root/docker/setup/02-packages.sh b/rootfs/root/docker/setup/02-packages.sh index 2159e10..01925ca 100755 --- a/rootfs/root/docker/setup/02-packages.sh +++ b/rootfs/root/docker/setup/02-packages.sh @@ -24,10 +24,17 @@ set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set env variables exitCode=0 - +node_bin="$(type -P nodejs)" +enclosed_bin="/usr/bin/enclosed" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Predifined actions -[ -d "/etc/nginx" ] && rm -Rf /etc/nginx/* +if [ -d "/etc/nginx" ]: then + rm -Rf /etc/nginx/* +fi +if [ -n "$node_bin" ]; then + copy "$node_bin" "$enclosed_bin" + chmod -f 755 "$enclosed_bin" +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Main script diff --git a/rootfs/usr/local/etc/docker/init.d/00-enclosed.sh b/rootfs/usr/local/etc/docker/init.d/00-enclosed.sh index e7473ff..89149e8 100755 --- a/rootfs/usr/local/etc/docker/init.d/00-enclosed.sh +++ b/rootfs/usr/local/etc/docker/init.d/00-enclosed.sh @@ -245,8 +245,7 @@ __update_conf_files() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # custom commands - copy "$(type -P node)" "/usr/local/bin/enclosed" - chmod -Rf 755 "/usr/local/bin/enclosed" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # replace variables # __replace "" "" "$CONF_DIR/enclosed.conf"