From 30908b8a63737b5e249f4f4b0ea4090851f4f446 Mon Sep 17 00:00:00 2001 From: Phil Dibowitz Date: Mon, 27 Mar 2023 17:53:38 -0700 Subject: [PATCH] Update chef_bootstrap for modern times (#247) Summary: This should work better. Test Plan: bash -n and shellcheck passes --- scripts/chef_bootstrap.sh | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/scripts/chef_bootstrap.sh b/scripts/chef_bootstrap.sh index ae51650..17ba6a0 100755 --- a/scripts/chef_bootstrap.sh +++ b/scripts/chef_bootstrap.sh @@ -11,18 +11,35 @@ OUTPUTS="/var/log/chef" bootstrap() { [ -x /bin/wget ] || yum install -y wget - [ ! -d /opt/cinc ] && \ + if [ ! -d /opt/cinc ]; then + mkdir -p /etc/chef $CHEFDIR $REPODIR $OUTPUTS wget -qO- 'https://omnitruck.cinc.sh/install.sh' | bash - mkdir -p /etc/chef $CHEFDIR $REPODIR $OUTPUTS + fi ln -sf /etc/chef /etc/cinc cat > $CHEF_PROD_CONFIG <