|
|
|
|
|
by eeZi
4276 days ago
|
|
I built a wifi repeater using a Raspberry Pi and two USB wifi adapters. The USB setup was not particularily stable and the devices would randomly reset. Thanks you systemd, all I had to was to create two systemd units, for hostapd and the NetworkManager connnection setup, and declare a hard dependency on the USB wifi adapters. This was possible thanks to the udev integration - you can simply declare a dependency on a device just like you would do for a service. systemd would then cleanly stop the particular unit if the device disappeared, and start it once it re-appeared. Of course, I could have done something similar using just udev and a service supervisor, but systemd made it as simple as adding a few lines to my unit description files. It was a rather unusual use case, and I was amazed at how easy it was to implement it. |
|