rpi_no_wifi.service
1.42 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
#
# rpi_no_wifi.service – Systemd service to disable WiFi on Raspberry Pi 3B/ZeroW
#
# Version 1.0, latest version, documentation and bugtracker available at:
# https://gitlab.lindenaar.net/scripts/raspberrypi
#
# Copyright (c) 2019 Frederik Lindenaar
#
# This script is free software: you can redistribute and/or modify it under the
# terms of version 3 of the GNU General Public License as published by the Free
# Software Foundation, or (at your option) any later version of the license.
#
# This script is distributed in the hope that it will be useful but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, visit <http://www.gnu.org/licenses/> to download it.
#
# To install copy to /etc/systemd/system/rpi_no_wifi.service
# enable it to start during boot with: systemctl enable rpi_no_wifi
# temporarily enable with: service rpi_no_wifi start
# temporarily disable with: service rpi_no_wifi stop
# disable starting during boot with: systemctl disable rpi_no_wifi
[Unit]
Description=Disable Raspberry Pi 3B/ZeroW WiFi interface
[Service]
Type=oneshot
ExecStart=/sbin/ifdown wlan0
ExecStop=/sbin/ifup wlan0
RemainAfterExit=yes
[Install]
WantedBy=default.target