用Exit代替自pkill

This commit is contained in:
eson 2018-12-22 23:31:13 +08:00
parent 6c51ba09bd
commit 0b6bd84d1c

View File

@ -3,6 +3,7 @@ package main
import ( import (
"log" "log"
"net" "net"
"os"
"os/exec" "os/exec"
"strings" "strings"
"sync/atomic" "sync/atomic"
@ -125,8 +126,7 @@ func (duties *DutiesNet) checkError2() bool {
func (duties *DutiesNet) checkError3() bool { func (duties *DutiesNet) checkError3() bool {
if duties.IsPPPNExist("ppp2") { if duties.IsPPPNExist("ppp2") {
log.Println("IsPPP2Exist not") log.Println("IsPPP2Exist not")
_, err := exec.Command("pkill", "pppoe_control").Output() os.Exit(2)
ErrorLog(err)
return true return true
} }
return false // 检测错误才返回true 否则 false return false // 检测错误才返回true 否则 false