#!/usr/bin/bash RUNNER_VERSION=4.0.1 wget -O "$FORGEJO_RUNNER_ROOT"/forgejo-runner https://code.forgejo.org/forgejo/runner/releases/download/v$RUNNER_VERSION/forgejo-runner-$RUNNER_VERSION-linux-amd64 chmod +x "$FORGEJO_RUNNER_ROOT"/forgejo-runner wget -O forgejo-runner.asc https://code.forgejo.org/forgejo/runner/releases/download/v$RUNNER_VERSION/forgejo-runner-$RUNNER_VERSION-linux-amd64.asc gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710 gpg --verify forgejo-runner.asc "$FORGEJO_RUNNER_ROOT"/forgejo-runner rm forgejo-runner.asc if [ -f "$FORGEJO_RUNNER_ROOT/.runner" ]; then echo "Found runner state." ( cp ./config.yml "$FORGEJO_RUNNER_ROOT/config.yml" cd "$FORGEJO_RUNNER_ROOT" || exit "$FORGEJO_RUNNER_ROOT"/forgejo-runner --config "${FORGEJO_RUNNER_CONFIG:=./config.yml}" daemon & ) else echo "Use $FORGEJO_RUNNER_ROOT/forgejo-runner register ... to register the runner" echo "Once registered, use $FORGEJO_RUNNER_ROOT/forgejo-runner --config daemon & to start" fi