This commit is contained in:
cdle
2021-09-26 21:03:32 +08:00
parent 8a859559cc
commit 885e9b1bc4
4 changed files with 8 additions and 7 deletions
+1 -3
View File
@@ -5,9 +5,7 @@ sillyGirl
dev.go dev.go
.DS_Store .DS_Store
develop/jd_cookie develop/jd_cookie
*.cache
jd_wskey jd_wskey
logs/* logs/*
jd_* jd_*
data data
sets.conf
+4 -4
View File
@@ -11,16 +11,16 @@ var Duration time.Duration
func init() { func init() {
killp() killp()
_, err := os.Stat("/etc/sillyGirl/")
if err != nil {
os.MkdirAll("/etc/sillyGirl/", os.ModePerm)
}
for _, arg := range os.Args { for _, arg := range os.Args {
if arg == "-d" { if arg == "-d" {
initStore() initStore()
Daemon() Daemon()
} }
} }
_, err := os.Stat("/etc/sillyGirl/")
if err != nil {
os.MkdirAll("/etc/sillyGirl/", os.ModePerm)
}
initStore() initStore()
ReadYaml(ExecPath+"/conf/", &Config, "https://raw.githubusercontent.com/cdle/sillyGirl/main/conf/demo_config.yaml") ReadYaml(ExecPath+"/conf/", &Config, "https://raw.githubusercontent.com/cdle/sillyGirl/main/conf/demo_config.yaml")
InitReplies() InitReplies()
+3
View File
@@ -21,6 +21,9 @@ func NewBucket(name string) Bucket {
} }
func initStore() { func initStore() {
// if _, err := os.Stat(ExecPath + "/sillyGirl.cache"); err == nil {
// os.Rename(ExecPath+"/sillyGirl.cache", "/etc/sillyGirl/sillyGirl.cache")
// }
var err error var err error
db, err = bolt.Open("/etc/sillyGirl/sillyGirl.cache", 0600, nil) db, err = bolt.Open("/etc/sillyGirl/sillyGirl.cache", 0600, nil)
if err != nil { if err != nil {
BIN
View File
Binary file not shown.