runner icon indicating copy to clipboard operation
runner copied to clipboard

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

Open Jason-Clark-FG opened this issue 1 year ago • 0 comments

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 avatar Jul 02 '24 20:07 Jason-Clark-FG