Ensure network is really up before sending mails
This commit is contained in:
parent
f85dc16246
commit
8543999a8a
|
@ -65,7 +65,8 @@ in
|
||||||
# Timed status mails (Boot, Shutdown, Weekly)
|
# Timed status mails (Boot, Shutdown, Weekly)
|
||||||
systemd.services."boot-mail-alert" = {
|
systemd.services."boot-mail-alert" = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network-online.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
|
@ -74,7 +75,8 @@ in
|
||||||
};
|
};
|
||||||
systemd.services."shutdown-mail-alert" = {
|
systemd.services."shutdown-mail-alert" = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network-online.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
|
|
Loading…
Reference in New Issue