This commit is contained in:
parent
b20bf61bf5
commit
961cf4ca5b
@ -48,7 +48,7 @@ func StopWireguard() {
|
|||||||
configFileName := getConfigFileName()
|
configFileName := getConfigFileName()
|
||||||
|
|
||||||
if err := exec.Command("/bin/sh", "-c", fmt.Sprintf("wg-quick down %s", configFileName)).Run(); err != nil {
|
if err := exec.Command("/bin/sh", "-c", fmt.Sprintf("wg-quick down %s", configFileName)).Run(); err != nil {
|
||||||
log.Errorf("停止wireguard服务端失败: %v", err.Error())
|
log.Errorf("停止wireguard[%s]服务端失败: %v", configFileName, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
@ -60,7 +60,7 @@ func StartWireguard() {
|
|||||||
configFileName := getConfigFileName()
|
configFileName := getConfigFileName()
|
||||||
|
|
||||||
if err := exec.Command("/bin/sh", "-c", fmt.Sprintf("wg-quick up %s", configFileName)).Run(); err != nil {
|
if err := exec.Command("/bin/sh", "-c", fmt.Sprintf("wg-quick up %s", configFileName)).Run(); err != nil {
|
||||||
log.Errorf("启动wireguard服务端失败: %v", err.Error())
|
log.Errorf("启动wireguard[%s]服务端失败: %v", configFileName, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user