foo:$sha256$fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9
foo:$argon2i$v=19$m=32768,t=3,p=4$OGU5MTM3YjVlYzQwZjhkZA$rVn53v6Ckpf7WH0676ZQLr9Hbm6VH3YnL6I9ONJcIIU
+While daemon working you can refresh -passwd file with SIGHUP:
+
+ $ kill -HUP `pidof gocheese`
+
+Before refreshing it's recommended to check -passwd file with -passwd-check
+option to prevent daemon failure
+
On-disk storage format
======================
"net/http"
"net/url"
"os"
+ "os/signal"
"path/filepath"
"regexp"
"runtime"
"strings"
+ "syscall"
)
const (
}
refreshPasswd()
log.Println("root:", *root, "bind:", *bind)
+ needsRefreshPasswd := make(chan os.Signal, 0)
+ signal.Notify(needsRefreshPasswd, syscall.SIGHUP)
+ go func() {
+ for range needsRefreshPasswd {
+ refreshPasswd()
+ }
+ }()
http.HandleFunc(*norefreshURLPath, handler)
http.HandleFunc(*refreshURLPath, handler)
log.Fatal(http.ListenAndServe(*bind, nil))