Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update create-latest-svc.sh to make it functional #3369

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Jason-Clark-FG
Copy link

Some small tweaks (and additions) to update this script so it will work...

  • Shebang was missing the bang,
  • Modified shebang to use env to find bash #!/usr/bin/env bash
  • Extended the bash options set -Eeo pipefail
  • Detect if running as root or with sudo and exit
  • Fix fatal function (cannot use () with function keyword)
  • Fix double square bracket pattern matching =~ / for $runner_scope
  • Fix single square bracket $RUNNER_TOKEN detection comparison operator == -> _
  • Update curl flags to enable silent operation

Future nice to have would be to automatically remove the service if the -f flag is selected. After which it could automatically remove the ./runner directory.

Feel free to modify this as necessary. It was tested on an Ubuntu 22.04 LTS system.

@Jason-Clark-FG Jason-Clark-FG requested a review from a team as a code owner July 2, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant