Notify tunnel up to systemd with sd_notify#370
Conversation
Allows usage of Type=notify systemd service types. Fixes: adrienverge#229
|
Perhaps this functionality would be best left to a pppd startup script (in But keep in mind that notifying the pppd tunnel is up is best left to pppd itself. Unfortunately pppd doesn't provide much more than scripts in What do you think? |
|
Thanks for merging. I don't have much knowledge about how this works. I basically grepped for 'Tunnel is up', put the sd_notify there, and verified it worked for my usecase. The problem with moving this functionality into pp is that ppp may be used by other things, or the user might not be aware that ppp is a thing. Indeed, I (as user) don't have much interest in knowing which part of the job is being done by ppp and which is being done by openfortivpn. So it seems to me that, as long as openfortivpn is the user-facing program, it should somehow provide a notification that the vpn is up. |
|
It's just that there are so many ways of notifying of events: systemd on servers, D-Bus on desktops, etc. openfortivpn cannot handle all these channels. It is up to the integrator (Linux distribution ?) to make sure pppd properly notifies of up/down and other events. Then users can subscribe to the proper channel if they are interested. Worst case, it is up to the openfortivpn installation script to install the machinery, probably as scripts in That's theory. In practice I am happy to merge your patch until theory becomes reality... |
Allows usage of Type=notify systemd service types.
Fixes: #229