14 lines
452 B
Plaintext
14 lines
452 B
Plaintext
|
|
[Unit]
|
||
|
|
Description=Set Wake-on-LAN on network interfaces
|
||
|
|
After=network.target
|
||
|
|
Wants=network.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=oneshot
|
||
|
|
ExecStart=/bin/bash -c '{% for intf, enabled, supported in en_interfaces | zip(wol_enabled.results, wol_supported.results) %}
|
||
|
|
{% if wol_mode in supported.stdout and wol_mode not in enabled.stdout %}/sbin/ethtool -s {{ intf }} wol {{ wol_mode }}; {% endif %}{% endfor %}'
|
||
|
|
RemainAfterExit=yes
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=multi-user.target
|