🎨
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
coward 2024-06-04 16:19:55 +08:00
parent b20bf61bf5
commit 961cf4ca5b

View File

@ -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