package main import ( "flag" "strconv" "imuslab.com/bokofs/bokofsd/mod/webdav" ) func main() { httpPort := flag.Int("p", 80, "Port to serve on (Plain HTTP)") serveSecure := flag.Bool("s", false, "Serve HTTPS. Default false") flag.Parse() webdavHandler := webdav.NewWebdavInterfaceServer(webdav.Options{ ListeningAddress: ":" + strconv.Itoa(*httpPort), SecureServe: *serveSecure, }) err := webdavHandler.Start() if err != nil { panic(err) } select {} } /* //Get all the devices under /dev that is either sd or nvme deviceFiles, err := os.ReadDir("/dev") if err != nil { panic(err) } for _, deviceFile := range deviceFiles { if deviceFile.IsDir() { continue } fullPath := "/dev/" + deviceFile.Name() if !smart.IsRootDisk(fullPath) { continue } if !smart.IsDiskSupportedType(fullPath) { fmt.Println("Unsupported disk type") continue } fmt.Println(fullPath) //Get the SMART data printout in json smartdata, err := smart.GetSMARTData(fullPath) if err != nil { fmt.Println(err) } js, _ := json.MarshalIndent(smartdata, "", " ") fmt.Println(string(js)) } */