Created
August 22, 2024 19:34
-
-
Save adde88/bac26da3807b0c5e2485e816db2b1ed4 to your computer and use it in GitHub Desktop.
Systemd service file: Automatically set both wlan0 and wlan1 to monitor mode at boot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Systemd service file: Automatically will set both wlan0 and wlan1 to monitor mode at boot | |
# Made by: @adde88 - 2024 - <[email protected]> | |
# | |
# Do this after installing this file to: /lib/systemd/system/: | |
# sudo systemctl daemon-reload | |
# sudo systemctl enable wifi-monitor-mode.service | |
# sudo systemctl start wifi-monitor-mode.service | |
# | |
[Unit] | |
Description=Set Wi-Fi Adapters to Monitor Mode | |
After=multi-user.target | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/bash -c 'ip link set wlan0 ; iw dev wlan0 set type monitor ; ip link set wlan0 up' | |
ExecStart=/bin/bash -c 'ip link set wlan1 down ; iw dev wlan1 set type monitor ; ip link set wlan1 up' | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment