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) {
|
(lib.mkIf (startCommand != null) {
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
|
serviceConfig.RemainAfterExit = true;
|
||||||
serviceConfig.ExecStart = startCommand;
|
serviceConfig.ExecStart = startCommand;
|
||||||
})
|
})
|
||||||
(lib.mkIf (cleanupCommand != null) {
|
(lib.mkIf (cleanupCommand != null) {
|
||||||
serviceConfig.ExecStopPost = cleanupCommand;
|
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