dsnet/remove.go

17 lines
270 B
Go
Raw Normal View History

2020-03-05 21:35:51 +01:00
package dsnet
import (
"os"
)
func Remove() {
if len(os.Args) <= 2 {
ExitFail("Hostname argument required: dsnet remove <hostname>")
}
conf := MustLoadDsnetConfig()
hostname := os.Args[2]
conf.MustRemovePeer(hostname)
conf.MustSave()
2020-03-05 21:43:31 +01:00
ConfigureDevice(conf)
2020-03-05 21:35:51 +01:00
}