apcupsd-service: workaround for "A stop job is running for UPS daemon"
When apcupsd has initiated a shutdown, systemd always ends up waiting for it to stop ("A stop job is running for UPS daemon"). This is weird, because in the journal one can clearly see that apcupsd has received the SIGTERM signal and has already quit (or so it seems). This reduces the wait time from 90 seconds (default) to just 5. Then systemd kills it with SIGKILL.
This commit is contained in:
parent
95e2006653
commit
fe9ac2ca1c
@ -153,6 +153,13 @@ in
|
|||||||
preStart = "mkdir -p /run/apcupsd/";
|
preStart = "mkdir -p /run/apcupsd/";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.apcupsd}/bin/apcupsd -b -f ${configFile} -d1";
|
ExecStart = "${pkgs.apcupsd}/bin/apcupsd -b -f ${configFile} -d1";
|
||||||
|
# TODO: When apcupsd has initiated a shutdown, systemd always ends up
|
||||||
|
# waiting for it to stop ("A stop job is running for UPS daemon"). This
|
||||||
|
# is weird, because in the journal one can clearly see that apcupsd has
|
||||||
|
# received the SIGTERM signal and has already quit (or so it seems).
|
||||||
|
# This reduces the wait time from 90 seconds (default) to just 5. Then
|
||||||
|
# systemd kills it with SIGKILL.
|
||||||
|
TimeoutStopSec = 5;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user