mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/drbd: fix
- fix environment.etc."drbd.conf" - don't generate an ExecStart script for just one command
This commit is contained in:
parent
036b909421
commit
aa37441c3e
1 changed files with 5 additions and 7 deletions
|
@ -47,19 +47,17 @@ let cfg = config.services.drbd; in
|
||||||
options drbd usermode_helper=/run/current-system/sw/bin/drbdadm
|
options drbd usermode_helper=/run/current-system/sw/bin/drbdadm
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.etc.drbd.conf =
|
environment.etc."drbd.conf" =
|
||||||
{ source = pkgs.writeText "drbd.conf" cfg.config; };
|
{ source = pkgs.writeText "drbd.conf" cfg.config; };
|
||||||
|
|
||||||
systemd.services.drbd = {
|
systemd.services.drbd = {
|
||||||
after = [ "systemd-udev.settle.service" "network.target" ];
|
after = [ "systemd-udev.settle.service" "network.target" ];
|
||||||
wants = [ "systemd-udev.settle.service" ];
|
wants = [ "systemd-udev.settle.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
script = ''
|
serviceConfig = {
|
||||||
${pkgs.drbd}/sbin/drbdadm up all
|
ExecStart = "${pkgs.drbd}/sbin/drbdadm up all";
|
||||||
'';
|
ExecStop = "${pkgs.drbd}/sbin/drbdadm down all";
|
||||||
serviceConfig.ExecStop = ''
|
};
|
||||||
${pkgs.drbd}/sbin/drbdadm down all
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue