From a7a63d179fc61b6f68cf96029d4f5f412964dd0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Kolsj=C3=B6?= Date: Mon, 2 Dec 2024 15:04:59 +0100 Subject: [PATCH] Go to home directory before running Co-authored-by: Peter Wall <47324121+p-wall@users.noreply.github.com> --- app/controllers/api/cloud_inits_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/cloud_inits_controller.rb b/app/controllers/api/cloud_inits_controller.rb index 0da9c1e..e3136d8 100644 --- a/app/controllers/api/cloud_inits_controller.rb +++ b/app/controllers/api/cloud_inits_controller.rb @@ -32,7 +32,7 @@ def show "curl https://maintenance.auctionet.dev/running; true", # The script relies on running sudo but we've disabled root which means it will bring up a prompt to set a password. Running su will run it as the default user that can sudo and also reload the /etc/environment variables. - "su username -c 'curl -s https://raw.githubusercontent.com/actions/runner/main/scripts/create-latest-svc.sh | bash -s #{App.github_actions_runner_scope}'", + "su username -c 'cd; 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",