nzyme icon indicating copy to clipboard operation
nzyme copied to clipboard

Add templatized systemd service unit file.

Open sshimko opened this issue 5 years ago • 2 comments

systemd templates make it possible to pass a parameter into a unit file when it is activated. This allows us to do two things in nzyme:

  1. Pass interface information into the unit. If you only use the template once, this still provides value as you can pass in a wireless interface without modifying the unit file directly.

  2. Untested: you can run multiple instances of nzyme, one per NIC, to have the same benefits apply to multiple interfaces, like wlan0, wlan1, etc.

To enable a templatized unit you do something like: systemctl enable [email protected]

Then to start it: systemctl start [email protected]

This new unit file also adds support for putting the interface into monitor mode on startup and puts it into managed mode on shutdown.

sshimko avatar May 14 '19 16:05 sshimko

Thank you very much! I am in the process of getting v1.0.0 out (there is a branch) and I'll keep this PR open until I reach the point where I build and test the new packages.

Makes total sense to me and will be a great addition to v1.0.0. Thank you.

lennartkoopmann avatar May 14 '19 21:05 lennartkoopmann

As an FYI I got around to testing multiple cards with the templatized unit file and it works as expected. Two instances are started using unique configuration files lead to two instances running concurrently each feeding data to graylog with a different nic_name field in GELF.

I also took a look at the v1.0.0 branch. I am very interested in what in coming :)

sshimko avatar May 20 '19 20:05 sshimko

No longer relevant in v2.0. Thank you for your submission!

lennartkoopmann avatar Dec 04 '22 19:12 lennartkoopmann