Skip to content
Snippets Groups Projects
Commit 833b1eb0 authored by Florian Sesser's avatar Florian Sesser
Browse files

Start megacli2prom by timer, not with multi-user.target

Take what I learned from @tomprince in
https://whetstone.privatestorage.io/privatestorage/PrivateStorageio/-/merge_requests/220#note_17605 :
Assigning a service a `startAt' will make timer.target start it,
no need to also have it `wantedBy' multiuser.target.

Also add megacli2prom to the path even if it should be already because
of megacli2prom.  Better be safe than sorry.
parent 0316d31b
No related branches found
No related tags found
No related merge requests found
......@@ -35,11 +35,10 @@ in {
config =
lib.mkIf cfg.enable {
environment.systemPackages = [ ourpkgs.megacli2prom ];
environment.systemPackages = [ ourpkgs.megacli2prom pkgs.megacli ];
systemd.services.megacli2prom = {
enable = true;
description = "MegaCli2Prom metrics gathering service";
wantedBy = [ "multi-user.target" ];
startAt = cfg.interval;
path = [ pkgs.megacli ];
# Save to a temp file and then move atomically so the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment