From 032a7ebb0ae03acecbfd1aa1ef92707b967e513c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Kolsj=C3=B6?= Date: Mon, 2 Dec 2024 14:25:28 +0100 Subject: [PATCH] Try another way to set up runcmd Co-authored-by: Peter Wall <47324121+p-wall@users.noreply.github.com> --- app/controllers/api/cloud_inits_controller.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/controllers/api/cloud_inits_controller.rb b/app/controllers/api/cloud_inits_controller.rb index a435e83..aa35a18 100644 --- a/app/controllers/api/cloud_inits_controller.rb +++ b/app/controllers/api/cloud_inits_controller.rb @@ -26,15 +26,15 @@ def show append: true, }, ], - runcmd: <<~BEGIN - export RUNNER_CFG_PAT=#{App.github_actions_runner_cfg_pat} - systemctl stop sshd - systemctl disable sshd - curl https://maintenance.auctionet.dev/running; true - curl -s https://raw.githubusercontent.com/actions/runner/main/scripts/create-latest-svc.sh | bash -s #{App.github_actions_runner_scope} - curl https://maintenance.auctionet.dev/it-ran; true - reboot - BEGIN + runcmd: [ + "while read -r env; do export \"$env\"; done < /etc/environment", + "systemctl stop sshd", + "systemctl disable sshd", + "curl https://maintenance.auctionet.dev/running; true", + "curl -s https://raw.githubusercontent.com/actions/runner/main/scripts/create-latest-svc.sh | bash -s #{App.github_actions_runner_scope}", + "curl https://maintenance.auctionet.dev/it-ran; true", + "reboot", + ], } yaml = "#cloud-config\n" +