v1.0.1
This commit is contained in:
parent
e97e8c903a
commit
814df2777c
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
pppoe_control
|
10
main.go
10
main.go
|
@ -5,7 +5,6 @@ import (
|
|||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -50,14 +49,7 @@ func checkTunExist() bool {
|
|||
|
||||
// CmdRestartHandler 接收到该命令就重启
|
||||
func (worker *Worker) CmdRestartHandler(w http.ResponseWriter, r *http.Request) {
|
||||
_tm := r.PostFormValue("tm")
|
||||
if _tm != "" {
|
||||
tm, err := strconv.ParseInt(_tm, 10, 64)
|
||||
if !ErrorLog(err) {
|
||||
log.Println(tm)
|
||||
worker.DNET.SetRestart()
|
||||
}
|
||||
}
|
||||
worker.DNET.SetRestart()
|
||||
w.Write([]byte("ok"))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user