start WG network when the machine is initialised via RPC call

This commit is contained in:
Pavel Sviderski committed 2024-09-10 18:23:55 +10:00
1 parent 4e2640bbd2
commit 676f22a935
2 files changed
+62 -36

No files matched your search

+1
View File
@@ -35,6 +35,7 @@ type PeerConfig struct {
PublicKey secret.Secret
}
// IsConfigured returns true if the configuration is complete to establish a WireGuard network.
func (c Config) IsConfigured() bool {
return c.Subnet != (netip.Prefix{}) && c.ManagementIP != (netip.Addr{}) &&
c.PrivateKey != nil && c.PublicKey != nil