mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
23 lines
524 B
Go
23 lines
524 B
Go
package config
|
|
|
|
// ShutdownState represents SSH configuration state that needs to be cleaned up.
|
|
type ShutdownState struct {
|
|
SSHConfigDir string
|
|
SSHConfigFile string
|
|
}
|
|
|
|
// Name returns the state name for the state manager.
|
|
func (s *ShutdownState) Name() string {
|
|
return "ssh_config_state"
|
|
}
|
|
|
|
// Cleanup removes SSH client configuration files.
|
|
func (s *ShutdownState) Cleanup() error {
|
|
manager := &Manager{
|
|
sshConfigDir: s.SSHConfigDir,
|
|
sshConfigFile: s.SSHConfigFile,
|
|
}
|
|
|
|
return manager.RemoveSSHClientConfig()
|
|
}
|