chore: 移除 daemon 模式
This commit is contained in:
@@ -30,9 +30,6 @@ func readConfig() {
|
||||
Basic: models.Basic{
|
||||
Timeout: 5,
|
||||
},
|
||||
Daemon: models.Daemon{
|
||||
Path: ".BitSrun",
|
||||
},
|
||||
Guardian: models.Guardian{
|
||||
Duration: 300,
|
||||
},
|
||||
|
||||
@@ -7,10 +7,6 @@ import (
|
||||
var Flags struct {
|
||||
//配置文件路径
|
||||
Path string
|
||||
//daemon模式内置标记
|
||||
RunningDaemon bool
|
||||
//强制daemon
|
||||
Daemon bool
|
||||
|
||||
Interface string
|
||||
}
|
||||
@@ -18,7 +14,5 @@ var Flags struct {
|
||||
func initFlags() {
|
||||
flag.StringVar(&Flags.Path, "config", "Config.yaml", "config path")
|
||||
flag.StringVar(&Flags.Interface, "interface", "", "specify the eth name")
|
||||
flag.BoolVar(&Flags.RunningDaemon, "running-daemon", false, "")
|
||||
flag.BoolVar(&Flags.Daemon, "daemon", false, "")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
@@ -4,11 +4,6 @@ import (
|
||||
"github.com/Mmx233/BitSrunLoginGo/pkg/srun"
|
||||
)
|
||||
|
||||
type Daemon struct {
|
||||
Enable bool `json:"enable" yaml:"enable" mapstructure:"enable"`
|
||||
Path string `json:"path" yaml:"path" mapstructure:"path"`
|
||||
}
|
||||
|
||||
type Guardian struct {
|
||||
Enable bool `json:"enable" yaml:"enable" mapstructure:"enable"`
|
||||
Duration uint `json:"duration" yaml:"duration" mapstructure:"duration"`
|
||||
@@ -39,7 +34,6 @@ type DDNS struct {
|
||||
type Settings struct {
|
||||
Basic Basic `json:"basic" yaml:"basic" mapstructure:"basic"`
|
||||
Guardian Guardian `json:"guardian" yaml:"guardian" mapstructure:"guardian"`
|
||||
Daemon Daemon `json:"daemon" yaml:"daemon" mapstructure:"daemon"`
|
||||
Log Log `json:"log" yaml:"log" mapstructure:"log"`
|
||||
DDNS DDNS `json:"ddns" yaml:"ddns" mapstructure:"ddns"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user