Commit 539f3b51 authored by ligaishun's avatar ligaishun

Update process.go

parent c51a3dfa
......@@ -394,7 +394,7 @@ func SafeCloseNode() (bool,error) {
func GetPubKey()string{
f,err:=os.Open("/root/.ssh/id_rsa.pub")
if err!=nil{
log.Println(err)
tlog.Info(err.Error())
}
r,_:=ioutil.ReadAll(f)
......@@ -405,6 +405,6 @@ func Preprocessing(){//判断密钥对是否存在,存在则删除
_, err := os.Stat("/root/.ssh")
if err == nil || os.IsExist(err){
err=os.RemoveAll("/root/.ssh")
fmt.Println(err)
tlog.Info(err.Error())
}
}
\ No newline at end of file
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