runner
runner copied to clipboard
Update create-latest-svc.sh to make it functional
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
fatalfunction (cannot use()withfunctionkeyword) - 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.