🎨取消web目录提交
This commit is contained in:
parent
207e568099
commit
19e3df80e7
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,6 +19,7 @@
|
|||||||
# vendor/
|
# vendor/
|
||||||
.idea
|
.idea
|
||||||
logs
|
logs
|
||||||
|
web
|
||||||
|
|
||||||
# Go workspace file
|
# Go workspace file
|
||||||
go.work
|
go.work
|
||||||
|
@ -3,7 +3,6 @@ package command
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"gitee.ltd/lxh/logger/log"
|
"gitee.ltd/lxh/logger/log"
|
||||||
"os"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
"wireguard-dashboard/repository"
|
"wireguard-dashboard/repository"
|
||||||
@ -49,11 +48,7 @@ func StopWireguard() {
|
|||||||
configFileName := getConfigFileName()
|
configFileName := getConfigFileName()
|
||||||
|
|
||||||
cmd := exec.Command("/bin/sh", "-c", fmt.Sprintf("wg-quick down %s", configFileName))
|
cmd := exec.Command("/bin/sh", "-c", fmt.Sprintf("wg-quick down %s", configFileName))
|
||||||
cmd.Stdout = os.Stdout
|
if err := cmd.Run(); err == nil {
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
log.Errorf("停止wireguard[%s]服务端失败: %v", configFileName, err.Error())
|
|
||||||
} else {
|
|
||||||
log.Infof("停止wireguard[%s]服务端成功", configFileName)
|
log.Infof("停止wireguard[%s]服务端成功", configFileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,11 +61,7 @@ func StartWireguard() {
|
|||||||
configFileName := getConfigFileName()
|
configFileName := getConfigFileName()
|
||||||
|
|
||||||
cmd := exec.Command("/bin/sh", "-c", fmt.Sprintf("wg-quick up %s", configFileName))
|
cmd := exec.Command("/bin/sh", "-c", fmt.Sprintf("wg-quick up %s", configFileName))
|
||||||
cmd.Stdout = os.Stdout
|
if err := cmd.Run(); err == nil {
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
log.Errorf("启动wireguard[%s]服务端失败: %v", configFileName, err.Error())
|
|
||||||
} else {
|
|
||||||
log.Infof("启动wireguard[%s]服务端成功", configFileName)
|
log.Infof("启动wireguard[%s]服务端成功", configFileName)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
package web
|
|
||||||
|
|
||||||
import "embed"
|
|
||||||
|
|
||||||
//go:embed index.html logo.svg favicon.ico platform-config.json static assets
|
|
||||||
var Static embed.FS
|
|
Loading…
Reference in New Issue
Block a user