Commit 3ee62f0f authored by Tsaiilin(蔡依林)'s avatar Tsaiilin(蔡依林)

Merge branch 'dev' into 'master'

Dev

See merge request !11
parents 3a45121d a8370263
...@@ -7,10 +7,12 @@ reconn_intervalz: 5s ...@@ -7,10 +7,12 @@ reconn_intervalz: 5s
net_check_interval: 5s net_check_interval: 5s
dns_cache_duration: 10m dns_cache_duration: 10m
net_check_url: https://www.baidu.com[extra] net_check_url: https://www.baidu.com[extra]
account: superman
redial: redial:
command: /bin/bash command: /bin/bash
exec_path: /root/ppp_redial.sh exec_path: /root/ppp_redial.sh
redial_duration: 5m redial_duration: 5m
wait_time: 10s wait_time: 10s
extra:
account: superman
env: debug
tunnel_addr: majora-vps-zj.virjar.com:5879 tunnel_addr: majora-vps-zj.virjar.com:5879
dns_server: 114.114.114.114:53 dns_server: 114.114.114.114:53
log_level: info log_level: info
...@@ -8,8 +7,12 @@ reconn_interval: 5s ...@@ -8,8 +7,12 @@ reconn_interval: 5s
net_check_interval: 5s net_check_interval: 5s
net_check_url: https://www.baidu.com net_check_url: https://www.baidu.com
dns_cache_duration: 10m dns_cache_duration: 10m
redial: redial:
command: /bin/bash command: /bin/bash
exec_path: /root/ppp_redial.sh exec_path: /root/ppp_redial.sh
redial_duration: 5m redial_duration: 5m
wait_time: 15s wait_time: 15s
extra:
account: superman
#!/usr/bin/env bash #!/usr/bin/env bash
sudo rm -fr /usr/lib/systemd/system/majora.service
sudo systemctl daemon-reload
sudo systemctl stop majora.service
old_pid=$(ps -ef | grep majora | grep -v grep | awk '{print $2}') old_pid=$(ps -ef | grep majora | grep -v grep | awk '{print $2}')
echo "old pid is ${old_pid}" echo "old pid is ${old_pid}"
......
...@@ -7,11 +7,7 @@ import ( ...@@ -7,11 +7,7 @@ import (
) )
func TestMustInitConfig(t *testing.T) { func TestMustInitConfig(t *testing.T) {
MustInitConfigAndWatch("/Users/tsaiilin/src/go/majora-go/conf/majora-dev.yaml", global.Config, func(config interface{}) { MustInitConfig("/Users/tsaiilin/src/go/majora-go/conf/majora-dev.yaml", global.Config)
fmt.Printf("config: %+v", global.Config) fmt.Printf("%+v", global.Config)
})
select {
}
} }
...@@ -50,9 +50,6 @@ func NewDefMajoraConf() *Configure { ...@@ -50,9 +50,6 @@ func NewDefMajoraConf() *Configure {
DNSServer: common.DNSServer, //nolint:typecheck DNSServer: common.DNSServer, //nolint:typecheck
ReconnInterval: reconninterval, ReconnInterval: reconninterval,
ClientID: uuid.New().String(), ClientID: uuid.New().String(),
Extra: Extra{
Account: uuid.New().String(),
},
Redial: Redial{ Redial: Redial{
RedialDuration: reconninterval, RedialDuration: reconninterval,
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment