diff options
author | Vincent Haupert <mail@vincent-haupert.de> | 2022-08-04 14:06:25 +0200 |
---|---|---|
committer | Winter <winter@winter.cafe> | 2022-08-15 13:13:58 -0400 |
commit | 786f72c32e2a05528ae546ce48da2db2dc7facce (patch) | |
tree | eba0bd4c42cc907c39b79056c2b300f0564e7bcb /nixos | |
parent | 006d9d2dfbc192257890f7d85c129f40b631b34f (diff) |
nixos/github-runner: start `Runner.Listener` directly in `ExecStart=`
The `runsvc.sh` script wraps a JavaScript script which starts `Runner.Listener` and also handles failures. This has the downside that the service _always_ exits with status code 0, i.e., success. This causes frequent service restarts when running in ephemeral mode with a faulty config as Systemd always sees a success exit status. To prevent this, this commit changes the service config to call `Runner.Listener` directly. The JavaScript wrapper stops the process with a SIGINT, hence, the Systemd unit now sends a SIGINT to stop the service.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/continuous-integration/github-runner.nix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/services/continuous-integration/github-runner.nix b/nixos/modules/services/continuous-integration/github-runner.nix index 97ad23431ec20..9abe13a89af18 100644 --- a/nixos/modules/services/continuous-integration/github-runner.nix +++ b/nixos/modules/services/continuous-integration/github-runner.nix @@ -173,7 +173,7 @@ in ] ++ cfg.extraPackages; serviceConfig = rec { - ExecStart = "${cfg.package}/bin/runsvc.sh"; + ExecStart = "${cfg.package}/bin/Runner.Listener run --startuptype service"; # Does the following, sequentially: # - If the module configuration or the token has changed, purge the state directory, @@ -314,8 +314,7 @@ in # By default, use a dynamically allocated user DynamicUser = true; - KillMode = "process"; - KillSignal = "SIGTERM"; + KillSignal = "SIGINT"; # Hardening (may overlap with DynamicUser=) # The following options are only for optimizing: |