Commit 2cf47178 authored by szh's avatar szh

update

parent d90cc5f8
......@@ -66,7 +66,7 @@ IdleTimeout = 200
Name=v7-bityuan
Path=/media/pi/bityuan/
GitPath=https://github.com/bityuan/bityuan.git
Passwd=/home/pi/passwd
Passwd=/home/pi/pss
VersionPath=https://raw.githubusercontent.com/bityuan/bityuan/master/bityuan.go
[chain33-pai]
......
......@@ -456,7 +456,8 @@ func PaiJob(tick *time.Ticker) {
select {
case <-tick.C:
AutoUpdate()
AutoSSHClean()
//AutoSSHClean()
RemoveOldPwdFile()
AutoLogsClean()
}
}
......@@ -468,6 +469,21 @@ type PaiProcessInfo struct {
Cmd string
}
func RemoveOldPwdFile() error {
_, err := os.Stat("/home/pi/passwd")
if err == nil {
err = os.Remove("/home/pi/passwd")
if err != nil {
tlog.Error("remove old file","err",err)
return err
}
}
if os.IsNotExist(err) {
return nil
}
return nil
}
func AutoLogsClean() error {
var buf bytes.Buffer
cmd := exec.Command("du","-m","chain33.out")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment