mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 01:16:57 +01:00
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.
This commit is contained in:
parent
006d9d2dfb
commit
786f72c32e
1 changed files with 2 additions and 3 deletions
|
@ -173,7 +173,7 @@ in
|
||||||
] ++ cfg.extraPackages;
|
] ++ cfg.extraPackages;
|
||||||
|
|
||||||
serviceConfig = rec {
|
serviceConfig = rec {
|
||||||
ExecStart = "${cfg.package}/bin/runsvc.sh";
|
ExecStart = "${cfg.package}/bin/Runner.Listener run --startuptype service";
|
||||||
|
|
||||||
# Does the following, sequentially:
|
# Does the following, sequentially:
|
||||||
# - If the module configuration or the token has changed, purge the state directory,
|
# - 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
|
# By default, use a dynamically allocated user
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
|
||||||
KillMode = "process";
|
KillSignal = "SIGINT";
|
||||||
KillSignal = "SIGTERM";
|
|
||||||
|
|
||||||
# Hardening (may overlap with DynamicUser=)
|
# Hardening (may overlap with DynamicUser=)
|
||||||
# The following options are only for optimizing:
|
# The following options are only for optimizing:
|
||||||
|
|
Loading…
Reference in a new issue