fix: exit 0 when gracefully shutting down (#5555)

This commit is contained in:
Henrique Dias 2025-11-16 14:13:21 +01:00 committed by GitHub
parent d01493106d
commit 5de4099cba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 2 additions and 70 deletions

View file

@ -26,7 +26,6 @@ import (
"github.com/filebrowser/filebrowser/v2/auth"
"github.com/filebrowser/filebrowser/v2/diskcache"
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
"github.com/filebrowser/filebrowser/v2/frontend"
fbhttp "github.com/filebrowser/filebrowser/v2/http"
"github.com/filebrowser/filebrowser/v2/img"
@ -241,18 +240,7 @@ user created with the credentials from options "username" and "password".`,
}
log.Println("Graceful shutdown complete.")
switch sig {
case syscall.SIGHUP:
d.err = fbErrors.ErrSighup
case syscall.SIGINT:
d.err = fbErrors.ErrSigint
case syscall.SIGQUIT:
d.err = fbErrors.ErrSigquit
case syscall.SIGTERM:
d.err = fbErrors.ErrSigTerm
}
return d.err
return nil
}, pythonConfig{allowNoDB: true}),
}