Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use wg syncconf #1164

Closed
wants to merge 5 commits into from
Closed

use wg syncconf #1164

wants to merge 5 commits into from

Conversation

jeffrysurya
Copy link
Contributor

thank you for your amazing pivpn project. i just read documentationon wg man page, and i found how to reload wg configuration without interrupt existing connection. by change systemctl restart wg-quick@wg0 to wg syncconfig wg0 <(wg-quick strip wg0). i already implement this on my server and works like charm, and i add another option to manual restart wireguard. thank you

wg syncconf to reload user, avoid interrupt other connection.
wg syncconf to reload user, avoid interrupt other connection.
@orazioedoardo
Copy link
Member

The reload command does just that:

$ grep ExecReload /usr/lib/systemd/system/[email protected]
ExecReload=/bin/bash -c 'exec /usr/bin/wg syncconf %i <(exec /usr/bin/wg-quick strip %i)'

And so I did: 63733b4. Always use the test branch as a reference: https://github.com/pivpn/pivpn/blob/master/CONTRIBUTING.md

@jeffrysurya
Copy link
Contributor Author

i'm on ubuntu 20.04 server cant reload using that command
image

i think this because of different distro
i'm sorry, i new on github procedure.

@orazioedoardo
Copy link
Member

Oh really, doesn't work? Ubuntu 20.04 Desktop or the version for Raspberry Pi?

@jeffrysurya
Copy link
Contributor Author

on desktop, i running on digitalocean.

@orazioedoardo
Copy link
Member

What version of wireguard-tools do you have? dpkg -s wireguard-tools

@jeffrysurya
Copy link
Contributor Author

image
version 1.0.20200513-1~20.04.2

@orazioedoardo
Copy link
Member

Looks like Ubuntu ships quite an old version of wireguard-tools.

@jeffrysurya
Copy link
Contributor Author

yea, i check on launchpad, the newer version is applie to ubuntu 20.10

@orazioedoardo
Copy link
Member

I did this but differently here. Thanks for pointing out that reload didn't work on Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants