update
This commit is contained in:
+1
-3
@@ -5,9 +5,7 @@ sillyGirl
|
||||
dev.go
|
||||
.DS_Store
|
||||
develop/jd_cookie
|
||||
*.cache
|
||||
jd_wskey
|
||||
logs/*
|
||||
jd_*
|
||||
data
|
||||
sets.conf
|
||||
data
|
||||
+4
-4
@@ -11,16 +11,16 @@ var Duration time.Duration
|
||||
|
||||
func init() {
|
||||
killp()
|
||||
_, err := os.Stat("/etc/sillyGirl/")
|
||||
if err != nil {
|
||||
os.MkdirAll("/etc/sillyGirl/", os.ModePerm)
|
||||
}
|
||||
for _, arg := range os.Args {
|
||||
if arg == "-d" {
|
||||
initStore()
|
||||
Daemon()
|
||||
}
|
||||
}
|
||||
_, err := os.Stat("/etc/sillyGirl/")
|
||||
if err != nil {
|
||||
os.MkdirAll("/etc/sillyGirl/", os.ModePerm)
|
||||
}
|
||||
initStore()
|
||||
ReadYaml(ExecPath+"/conf/", &Config, "https://raw.githubusercontent.com/cdle/sillyGirl/main/conf/demo_config.yaml")
|
||||
InitReplies()
|
||||
|
||||
@@ -21,6 +21,9 @@ func NewBucket(name string) Bucket {
|
||||
}
|
||||
|
||||
func initStore() {
|
||||
// if _, err := os.Stat(ExecPath + "/sillyGirl.cache"); err == nil {
|
||||
// os.Rename(ExecPath+"/sillyGirl.cache", "/etc/sillyGirl/sillyGirl.cache")
|
||||
// }
|
||||
var err error
|
||||
db, err = bolt.Open("/etc/sillyGirl/sillyGirl.cache", 0600, nil)
|
||||
if err != nil {
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user