mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
fix: exit 0 when gracefully shutting down (#5555)
This commit is contained in:
parent
d01493106d
commit
5de4099cba
4 changed files with 2 additions and 70 deletions
14
cmd/root.go
14
cmd/root.go
|
|
@ -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}),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ type pythonConfig struct {
|
|||
type pythonData struct {
|
||||
hadDB bool
|
||||
store *storage.Storage
|
||||
err error
|
||||
}
|
||||
|
||||
func dbExists(path string) (bool, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue