用Exit代替自pkill
This commit is contained in:
parent
6c51ba09bd
commit
0b6bd84d1c
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
|
@ -125,8 +126,7 @@ func (duties *DutiesNet) checkError2() bool {
|
|||
func (duties *DutiesNet) checkError3() bool {
|
||||
if duties.IsPPPNExist("ppp2") {
|
||||
log.Println("IsPPP2Exist not")
|
||||
_, err := exec.Command("pkill", "pppoe_control").Output()
|
||||
ErrorLog(err)
|
||||
os.Exit(2)
|
||||
return true
|
||||
}
|
||||
return false // 检测错误才返回true 否则 false
|
||||
|
|
Loading…
Reference in New Issue
Block a user