Files
runneros/mkosi.extra/usr/lib/systemd/system/gitea-runner.service
T
Job79andClaude Opus 5.5 5f2a5c2b23 First-boot setup on the serial console too
The setup asked only on the screen (tty1); it now also asks on the serial console (ttyS0), so a
VM can be set up from a serial terminal or a script. Whichever console is answered first stops
the setup on the other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V27snprgiQMRMB6RRDNjCX
2026-11-14 12:21:50 +00:00

29 lines
1.3 KiB
Desktop File

# The Gitea Actions runner. Registers itself on its first start.
[Unit]
Description=Gitea Actions runner
Wants=network-online.target gitea-runner-images.service
# gitea-runner-setup writes runner.env on first boot.
After=network-online.target podman.socket gitea-runner-images.service
After=gitea-runner-setup@tty1.service gitea-runner-setup@ttyS0.service
Requires=podman.socket
[Service]
# Runs as root: it drives root's podman, which is root access anyway. The jobs it starts never
# get the socket (see config.yaml).
WorkingDirectory=/var/lib/gitea-runner
EnvironmentFile=/var/lib/gitea-runner/runner.env
Environment=HOME=/var/lib/gitea-runner
Environment=DOCKER_HOST=unix:///run/podman/podman.sock
# The hostname is the runner's name. /etc is read-only, so it is set on every start.
ExecStartPre=/usr/bin/hostnamectl hostname --transient ${GITEA_RUNNER_NAME}
# Register once; the result is kept in .runner.
ExecStartPre=/bin/sh -c '[ -f .runner ] || exec gitea-runner register --no-interactive --config /usr/lib/gitea-runner/config.yaml --instance "$GITEA_INSTANCE_URL"'
ExecStart=/usr/bin/gitea-runner daemon --config /usr/lib/gitea-runner/config.yaml
Restart=on-failure
# A bit longer than runner.shutdown_timeout, so running jobs can finish on stop.
TimeoutStopSec=35min
RestartSec=10s
[Install]
WantedBy=multi-user.target