mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-10 00:41:29 +02:00
26 lines
962 B
Go
26 lines
962 B
Go
//go:build !android
|
|
|
|
package server
|
|
|
|
import (
|
|
"github.com/netbirdio/netbird/client/firewall/iptables"
|
|
"github.com/netbirdio/netbird/client/firewall/nftables"
|
|
"github.com/netbirdio/netbird/client/internal/dns"
|
|
"github.com/netbirdio/netbird/client/internal/routemanager/systemops"
|
|
"github.com/netbirdio/netbird/client/internal/statemanager"
|
|
"github.com/netbirdio/netbird/client/ssh/config"
|
|
vncserver "github.com/netbirdio/netbird/client/vnc/server"
|
|
)
|
|
|
|
// registerStates registers all states that need crash recovery cleanup.
|
|
func registerStates(mgr *statemanager.Manager) {
|
|
mgr.RegisterState(&dns.ShutdownState{})
|
|
mgr.RegisterState(&systemops.ShutdownState{})
|
|
mgr.RegisterState(&nftables.ShutdownState{})
|
|
mgr.RegisterState(&iptables.ShutdownState{})
|
|
mgr.RegisterState(&config.ShutdownState{})
|
|
// Virtual VNC sessions leave an X server and a desktop behind if the daemon
|
|
// dies without stopping them.
|
|
mgr.RegisterState(&vncserver.ShutdownState{})
|
|
}
|