Added systemd units
This commit is contained in:
parent
330a1ae513
commit
91fba6ab94
38
README.md
38
README.md
@ -107,3 +107,41 @@ hcxpcapngtool -o wpa.hccapx wpa*-01.cap &&
|
||||
hashcat -m 22000 -a 0 wpa.hccapx \
|
||||
/usr/share/wordlists/rockyou.txt.gz
|
||||
```
|
||||
|
||||
## Running via systemd
|
||||
|
||||
The systemd unit files can be used to automatically start the corresponding
|
||||
scripts upon system boot.
|
||||
|
||||
This setup assumes the repository to be located in the /root directory.
|
||||
|
||||
Install the systemd unit files.
|
||||
|
||||
```sh
|
||||
sudo cp -v wpe-mon@.service /etc/systemd/system/wpe-mon@.service
|
||||
sudo cp -v wpe@.service /etc/systemd/system/wpe@.service
|
||||
```
|
||||
|
||||
Apply the changes.
|
||||
|
||||
```sh
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
To set the mon script to use the wlan1 interface and start automatically.
|
||||
|
||||
```sh
|
||||
sudo systemctl enable wpe-mon@wlan1.service
|
||||
```
|
||||
|
||||
Alternatively with the wlan2 interface.
|
||||
|
||||
```sh
|
||||
sudo systemctl enable wpe-mon@wlan2.service
|
||||
```
|
||||
|
||||
Similarly for the wpe script.
|
||||
|
||||
```sh
|
||||
sudo systemctl enable wpe@wlan1.service
|
||||
```
|
||||
|
16
wpe-mon@.service
Normal file
16
wpe-mon@.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Run wpe mon for %I
|
||||
# Tie the service lifecycle to the kernel device for the interface
|
||||
BindsTo=sys-subsystem-net-devices-%i.device
|
||||
After=sys-subsystem-net-devices-%i.device
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/root/wpe
|
||||
ExecStart=/root/wpe/mon -i %I
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
# Make the service start whenever the device unit appears
|
||||
WantedBy=sys-subsystem-net-devices-%i.device
|
16
wpe@.service
Normal file
16
wpe@.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Run wpe for %I
|
||||
# Tie the service lifecycle to the kernel device for the interface
|
||||
BindsTo=sys-subsystem-net-devices-%i.device
|
||||
After=sys-subsystem-net-devices-%i.device
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/root/wpe
|
||||
ExecStart=/root/wpe/wpe -i %I
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
# Make the service start whenever the device unit appears
|
||||
WantedBy=sys-subsystem-net-devices-%i.device
|
Loading…
x
Reference in New Issue
Block a user