summaryrefslogtreecommitdiff
path: root/roles/network/wakeonlan/templates/wakeonlan.service.j2
blob: c163e8a78c3358fde55ddfc8c9daff81c6ff53f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[Unit]
Description=Configure Wake-on-LAN

[Service]
Type=oneshot
{% for interface in wakeonlan_interfaces %}
ExecStart=/usr/sbin/ethtool -s {{ interface }} wol {{ wakeonlan_options | join }}
{% endfor %}
{% for interface in wakeonlan_interfaces %}
ExecStop=/usr/sbin/ethtool -s {{ interface }} wol d
{% endfor %}
RemainAfterExit=yes
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=strict
ProtectHome=yes
ProtectKernelTunables=yes
ProtectControlGroups=yes
RestrictRealtime=yes
RestrictAddressFamilies=AF_UNIX AF_NETLINK
SystemCallArchitectures=native

[Install]
WantedBy=basic.target