18 lines
366 B
SYSTEMD
18 lines
366 B
SYSTEMD
|
# !! Requires a netdev configured to work
|
||
|
#
|
||
|
# $ cp -v ./wifi-power\@.service /etc/systemd/system/
|
||
|
# $ systemctl daemon-reload
|
||
|
#
|
||
|
#
|
||
|
# $ systemctl enable --now wifi-power@wlan0
|
||
|
[Unit]
|
||
|
Description=Toggle %i power saving
|
||
|
|
||
|
[Service]
|
||
|
Type=oneshot
|
||
|
ExecStart=iw %i set power_save on
|
||
|
ExecStop=iw %i set power_save off
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=sys-subsystem-net-devices-%i.device
|