This fixes two problems:
1) systemctl may not live in /usr/bin/systemctl but in /bin.
This is what I got on my Debian Bullseye that was upgraded over many generations:
systemd[1]: Starting wg0-reload.service...
systemd[1609458]: wg0-reload.service: Failed to locate executable /usr/bin/systemctl: No such file or directory
systemd[1609458]: wg0-reload.service: Failed at step EXEC spawning /usr/bin/systemctl: No such file or directory
systemd[1]: wg0-reload.service: Main process exited, code=exited, status=203/EXEC
systemd[1]: wg0-reload.service: Failed with result 'exit-code'.
systemd[1]: Failed to start wg0-reload.service.
After this change:
systemd[1]: Starting wg0-reload.service...
systemd[1]: Reloading WireGuard via wg-quick(8) for wg0.
systemd[1]: Reloaded WireGuard via wg-quick(8) for wg0.
systemd[1]: wg0-reload.service: Succeeded.
systemd[1]: Finished wg0-reload.service.
The docs for ExecStart say
https://www.freedesktop.org/software/systemd/man/systemd.service.html :
[...] either an absolute path to an executable or a simple file name without any slashes
So this is OK, and works fine as tested here.
2) Using "reload" instead of "restart" avoids breaking existing
connections.
Supersedes https://github.com/ngoduykhanh/wireguard-ui/pull/316
Fixes https://github.com/ngoduykhanh/wireguard-ui/issues/228
Fixes https://github.com/ngoduykhanh/wireguard-ui/issues/167
Under Global Settings, the MTU value on the left is by default set to 1450, but the documentation claims 1420. This updates the documentation to match the correct default value.
Helpful for those who already have users deployed.
Enter `-` in the Preshared Key field at user creation time to skip its
creation.
The template conf takes care of the rest.
Fixes issue #235
After login, my browser gets a 404 for `/wireguard`. `wireguard` might
not be explicitly set by `BASE_PATH`, so just use the `{{.basePath}}`
instead.
Fixes#259.