On Fri, Jul 24, 2020 at 3:09 PM Tomcsányi, Domonkos <[email protected]> wrote: > > On Fri, Jul 24, 2020 at 11:29 AM Jason A. Donenfeld <[email protected]> wrote: > > > > On Fri, Jul 24, 2020 at 11:25 AM Garrit Franke <[email protected]> > > wrote: > > > > > > On Fri, Jul 24, 2020 at 11:14:52AM +0200, Jason A. Donenfeld wrote: > > > > On Fri, Jul 24, 2020 at 10:30 AM Tomcsanyi, Domonkos > > > > <[email protected]> wrote: > > > > > > > > > > Signed-off-by: Domonkos P. Tomcsanyi <[email protected]> > > > > > --- > > > > > src/systemd/[email protected] | 1 + > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > diff --git a/src/systemd/[email protected] > > > > > b/src/systemd/[email protected] > > > > > index a9cbb58..8eb040b 100644 > > > > > --- a/src/systemd/[email protected] > > > > > +++ b/src/systemd/[email protected] > > > > > @@ -15,6 +15,7 @@ Type=oneshot > > > > > RemainAfterExit=yes > > > > > ExecStart=/usr/bin/wg-quick up %i > > > > > ExecStop=/usr/bin/wg-quick down %i > > > > > +ExecReload=/bin/bash -c '/usr/bin/wg syncconf %i <(/usr/bin/wg-quick > > > > > strip > > > > > %i)' > > > > > Environment=WG_ENDPOINT_RESOLUTION_RETRIES=infinity > > > > > > > > > > [Install] > > > > > -- > > > > > 2.17.1 > > > > > > > > > > Not the cleanest solution, but I think it might help a lot of people, > > > > > so I'm > > > > > submitting it. > > > > > > > > This actually doesn't seem too bad to me. Are there cleaner solutions > > > > that I'm not thinking of that I should consider before applying this > > > > patch? > > > > > > I think it doesn't get cleaner than this one-liner. > > > Some time back I submitted a patch that added a restart command to > > > wg-tools. > > > We settled on the conclusion that a systemd approach would be much > > > cleaner. > > > > Right, I recall this conversation, and this patch seems to be what we > > all had in mind there. So I'm just wondering about the "not the > > cleanest" part in the original patch -- if there are other systemd > > tricks or something to consider. > > > Thanks for the positive feedback guys. I'm not very much experienced > with systemd and frankly this one liner was the first hit from a > simple Google search, hence my comment about it not being the > best/cleanest solution. It suited my needs and it worked, so I decided > to send it in, because the functionality seemed like something other > sysadmins would appreciate. > If you like it and there is currently no other solution suggested by > the list I'd be very happy and proud to have it merged :).
Great, good to know. Made some small adjustments and committed this as: https://git.zx2c4.com/wireguard-tools/commit/?id=a66219fa107e1bf0a03ebbbc405879c1f0a826c5 Thanks for the patch! Jason
