users/systemd: fix so oneshot services arent stopped immediately after activation
This commit is contained in:
@@ -94,10 +94,12 @@ let
|
||||
})
|
||||
(lib.mkIf (startCommand != null) {
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = true;
|
||||
serviceConfig.ExecStart = startCommand;
|
||||
})
|
||||
(lib.mkIf (cleanupCommand != null) {
|
||||
serviceConfig.ExecStopPost = cleanupCommand;
|
||||
serviceConfig.TimeoutStopSec = "30s"; #< system-wide default is closer to 10s, but eg25-control-powered takes longer than that
|
||||
})
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user