Skip to content

Instantly share code, notes, and snippets.

@ngxson
Created August 17, 2023 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngxson/9672d720c86234299623caa703e615d1 to your computer and use it in GitHub Desktop.
Save ngxson/9672d720c86234299623caa703e615d1 to your computer and use it in GitHub Desktop.
Wireguard GUI
[Unit]
Description=Watch /etc/wireguard/wg0.conf for changes
[Path]
PathModified=/etc/wireguard/wg0.conf
[Install]
WantedBy=multi-user.target
[Unit]
Description=Restart WireGuard
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl restart wg-quick@wg0.service
[Install]
RequiredBy=wgui.path
[Unit]
Description=Wireguard GUI Service
After=network.target
[Service]
ExecStart=/bin/wireguard-ui
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment