add Wireguard systemd service configuration
This commit is contained in:
parent
fea4d78d1e
commit
262381c930
3 changed files with 26 additions and 0 deletions
8
wg/wg-gen.path
Normal file
8
wg/wg-gen.path
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Watch /etc/wireguard for changes
|
||||
|
||||
[Path]
|
||||
PathModified=/etc/wireguard
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
10
wg/wg-gen.service
Normal file
10
wg/wg-gen.service
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Restart WireGuard
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/systemctl restart wg-quick@wg0.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in a new issue