Skip to content

Instantly share code, notes, and snippets.

@francoism90
Created November 16, 2018 18:09
Show Gist options
  • Save francoism90/e1ab870baafcb8bad344d0fda2f29207 to your computer and use it in GitHub Desktop.
Save francoism90/e1ab870baafcb8bad344d0fda2f29207 to your computer and use it in GitHub Desktop.
Set txpower and monitor mode
[Unit]
Description=Set 88XXau txpower and monitor-mode
After=systemd-udevd.service systemd-sysusers.service systemd-sysctl.service
Before=network-pre.target multi-user.target shutdown.target
Conflicts=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=sh -c 'iw %i set txpower fixed 3000'
ProtectSystem=strict
ProtectHome=yes
ProtectControlGroups=yes
MemoryDenyWriteExecute=yes
RestrictRealtime=yes
RestrictNamespaces=cgroup ipc
RestrictNamespaces=cgroup net
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
SystemCallFilter=@system-service
SystemCallErrorNumber=EPERM
SystemCallArchitectures=native
LockPersonality=yes
RuntimeDirectory=systemd/netif
RuntimeDirectoryPreserve=yes
[Install]
WantedBy=multi-user.target
@francoism90
Copy link
Author

e.g. systemctl enable 88XXau@wlp0s20.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment