File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ These environment variables only apply to the docker container.
105
105
| -----------------------| ---------------------------------------------------------------| ---------|
106
106
| ` WGUI_MANAGE_START ` | Start/stop WireGuard when the container is started/stopped | ` false ` |
107
107
| ` WGUI_MANAGE_RESTART ` | Auto restart WireGuard when we Apply Config changes in the UI | ` false ` |
108
+ | ` WGUI_MANAGE_RELOAD ` | Auto reload WireGuard when we Apply Config changes in the UI | ` false ` |
108
109
109
110
## Auto restart WireGuard daemon
110
111
@@ -198,6 +199,10 @@ running the container with `restart: unless-stopped`. These settings can also pi
198
199
Path, after restarting the container. Please make sure you have ` --cap-add=NET_ADMIN ` in your container config to make
199
200
this feature work.
200
201
202
+ Set ` WGUI_MANAGE_RELOAD=true ` to manage Wireguard interface reload.
203
+ Using ` WGUI_MANAGE_RELOAD=true ` will use ` wg syncconf wg0 /path/to/file ` to update the wireguard running-configuration
204
+ without restart. Please make sure you have ` --cap-add=NET_ADMIN ` in your container config to make this feature work.
205
+
201
206
## Build
202
207
203
208
### Build docker image
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ case $WGUI_MANAGE_RESTART in (1|t|T|true|True|TRUE)
18
18
done &
19
19
esac
20
20
21
+ # manage wireguard reload
22
+ case $WGUI_MANAGE_RELOAD in (1|t|T|true|True|TRUE)
23
+ [[ -f $conf ]] || touch " $conf " # inotifyd needs file to exist
24
+ inotifyd - " $conf " :w | while read -r event file; do
25
+ wg syncconf wg0 <( wg-quick strip wg0)
26
+ done &
27
+ esac
21
28
22
29
./wg-ui &
23
30
wait $!
You can’t perform that action at this time.
0 commit comments