Add Basic healtcheck

This commit is contained in:
Mukhtar Akere
2025-06-02 20:45:39 +01:00
parent f041ef47a7
commit 30a1dd74a7
2 changed files with 10 additions and 2 deletions

View File

@@ -22,8 +22,12 @@ type HealthStatus struct {
}
func main() {
var configPath string
var (
configPath string
isBasicCheck bool
)
flag.StringVar(&configPath, "config", "/data", "path to the data folder")
flag.BoolVar(&isBasicCheck, "basic", false, "perform basic health check without WebDAV")
flag.Parse()
config.SetConfigPath(configPath)
cfg := config.Get()
@@ -64,7 +68,7 @@ func main() {
}
// Check WebDAV if enabled
if webdavPath != "" {
if !isBasicCheck && webdavPath != "" {
if checkWebDAV(ctx, baseUrl, port, webdavPath) {
status.WebDAVService = true
}