mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-14 06:51:15 +00:00
fix: autosave wireguard conf files (#303)
* fix: autosave wireguard conf files - Fix subscription to Interface and Peer updates topics - Remove admin permissions validation - Update file on peer deletion - Change save condition to configured storage path only, as initialized interface is not nil * Added comment to peer config for prometheus exporter
This commit is contained in:
@@ -60,6 +60,8 @@ PostDown = {{ .Interface.PostDown }}
|
||||
{{range .Peers}}
|
||||
{{- if not .IsDisabled}}
|
||||
[Peer]
|
||||
{{/* `friendly_name` used by https://github.com/MindFlavor/prometheus_wireguard_exporter */ -}}
|
||||
# friendly_name = {{ .DisplayName }}
|
||||
# -WGP- Peer: {{.Identifier}}
|
||||
# -WGP- Created: {{.CreatedAt}}
|
||||
# -WGP- Updated: {{.UpdatedAt}}
|
||||
@@ -86,4 +88,4 @@ Endpoint = {{ .Endpoint.GetValue }}
|
||||
PersistentKeepalive = {{ .PersistentKeepalive.GetValue }}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
Reference in New Issue
Block a user