Commit 7b69a4ee authored by Chris Merrett's avatar Chris Merrett

Commands with slash line seperation not working, one-linered everywhere

parent b3b1caf8
Pipeline #4966 passed with stage
in 16 seconds
......@@ -27,30 +27,19 @@ systemctl daemon-reload
systemctl restart kubelet kube-proxy
# Install cron
yum -y install crontabs && \
chkconfig crond on && \
service crond start
yum -y install crontabs && chkconfig crond on && service crond start
# Add Steamhaus user
adduser steamhaus && \
passwd -l steamhaus && \
mkdir -p /home/steamhaus/bin && \
mkdir -p /home/steamhaus/.ssh && \
chmod 700 /home/steamhaus/.ssh
adduser steamhaus && passwd -l steamhaus && mkdir -p /home/steamhaus/bin && mkdir -p /home/steamhaus/.ssh && chmod 700 /home/steamhaus/.ssh
# Ensure Steamhaus user has full passwordless root
echo "steamhaus ALL=(ALL)NOPASSWD:ALL" > /etc/sudoers.d/steamhaus && \
chmod 440 /etc/sudoers.d/steamhaus
echo "steamhaus ALL=(ALL)NOPASSWD:ALL" > /etc/sudoers.d/steamhaus && chmod 440 /etc/sudoers.d/steamhaus
# Create Steamhaus SSH credential update script
wget --no-check-certificate "https://gist.githubusercontent.com/chrisfu/87b642951aadafa62b99/raw/sh_pubkey_update.sh" -O /home/steamhaus/bin/sh_pubkey_update.sh && \
sed -i 's/`whoami`/steamhaus/g' /home/steamhaus/bin/sh_pubkey_update.sh && \
chmod 755 /home/steamhaus/bin/sh_pubkey_update.sh
wget --no-check-certificate "https://gist.githubusercontent.com/chrisfu/87b642951aadafa62b99/raw/sh_pubkey_update.sh" -O /home/steamhaus/bin/sh_pubkey_update.sh && sed -i s,`whoami`,steamhaus,g /home/steamhaus/bin/sh_pubkey_update.sh && chmod 755 /home/steamhaus/bin/sh_pubkey_update.sh
# Perform first-time update of Steamhaus SSH credentials
/home/steamhaus/bin/sh_pubkey_update.sh && \
# Add Steamhaus update script to cron, run 1am every morning, if first run succeeds
echo "0 1 * * * /home/steamhaus/bin/sh_pubkey_update.sh" > /var/spool/cron/steamhaus
/home/steamhaus/bin/sh_pubkey_update.sh && echo "0 1 * * * /home/steamhaus/bin/sh_pubkey_update.sh" > /var/spool/cron/steamhaus
# Ensure everything within Steamhaus home directory is owned by Steamhaus
chown -R steamhaus: /home/steamhaus/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment