Fix: xen-bridge systemd service

This commit is contained in:
Thomas Strobel 2015-06-09 15:08:06 +02:00 committed by Rok Garbas
parent a6e12c23fc
commit 399b549611

View File

@ -262,16 +262,13 @@ in
wantedBy = [ "multi-user.target" ];
before = [ "xen-domains.service" ];
serviceConfig.RemainAfterExit = "yes";
serviceConfig.ExecStart = ''
${pkgs.bridge-utils}/bin/brctl addbr ${cfg.bridge}
${pkgs.inetutils}/bin/ifconfig ${cfg.bridge} up
'';
serviceConfig.ExecStop = ''
${pkgs.inetutils}/bin/ifconfig ${cfg.bridge} down
${pkgs.bridge-utils}/bin/brctl delbr ${cfg.bridge}
'';
serviceConfig.ExecStart = "${pkgs.bridge-utils}/bin/brctl addbr ${cfg.bridge}";
postStart = "${pkgs.inetutils}/bin/ifconfig ${cfg.bridge} up";
serviceConfig.ExecStop = "${pkgs.inetutils}/bin/ifconfig ${cfg.bridge} down";
postStop = "${pkgs.bridge-utils}/bin/brctl delbr ${cfg.bridge}";
};
systemd.services.xen-domains = {
description = "Xen domains - automatically starts, saves and restores Xen domains";
wantedBy = [ "multi-user.target" ];