From 89e4df134bf0792a658db27a04e36f67a30a2acf Mon Sep 17 00:00:00 2001 From: Kwonunn Date: Wed, 18 Sep 2024 10:36:39 +0000 Subject: [PATCH] Add example systemd service file (#273) Adds an example systemd service file. This is meant for the new and hopefully improved runner installation docs i'm writing over at [forgejo/docs#869](https://codeberg.org/forgejo/docs/pulls/860). Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/273 Reviewed-by: Michael Kriese Co-authored-by: Kwonunn Co-committed-by: Kwonunn --- contrib/forgejo-runner.service | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 contrib/forgejo-runner.service diff --git a/contrib/forgejo-runner.service b/contrib/forgejo-runner.service new file mode 100644 index 0000000..a5e4e6e --- /dev/null +++ b/contrib/forgejo-runner.service @@ -0,0 +1,16 @@ +[Unit] +Description=Forgejo Runner +Documentation=https://forgejo.org/docs/latest/admin/actions/ +After=docker.service + +[Service] +ExecStart=forgejo-runner daemon +ExecReload=/bin/kill -s HUP $MAINPID +User=runner # This user must be created first +WorkingDirectory=/home/runner # This directory must be created first +Restart=on-failure +TimeoutSec=0 +RestartSec=10 + +[Install] +WantedBy=multi-user.target