merged xterm.html and xterm-pts.html
made relevant code changes oin the server side as well
This commit is contained in:
@ -107,7 +107,7 @@ type ClientAppConfig struct {
|
||||
PeerConnTmout time.Duration `yaml:"peer-conn-timeout"`
|
||||
PtsUser string `yaml:"pts-user"`
|
||||
PtsShell string `yaml:"pts-shell"`
|
||||
XtermPtsHtmlFile string `yaml:"xterm-pts-html-file"`
|
||||
XtermHtmlFile string `yaml:"xterm-html-file"`
|
||||
}
|
||||
|
||||
type ServerConfig struct {
|
||||
|
16
cmd/main.go
16
cmd/main.go
@ -254,8 +254,8 @@ func client_main(ctl_addrs []string, rpc_addrs []string, route_configs []string,
|
||||
var logfile_rotate int
|
||||
var pts_user string
|
||||
var pts_shell string
|
||||
var xterm_pts_html_file string
|
||||
var xterm_pts_html string
|
||||
var xterm_html_file string
|
||||
var xterm_html string
|
||||
var i int
|
||||
var err error
|
||||
|
||||
@ -287,7 +287,7 @@ func client_main(ctl_addrs []string, rpc_addrs []string, route_configs []string,
|
||||
logfile_rotate = cfg.APP.LogRotate
|
||||
pts_user = cfg.APP.PtsUser
|
||||
pts_shell = cfg.APP.PtsShell
|
||||
xterm_pts_html_file = cfg.APP.XtermPtsHtmlFile
|
||||
xterm_html_file = cfg.APP.XtermHtmlFile
|
||||
config.RpcConnMax = cfg.APP.MaxRpcConns
|
||||
config.PeerConnMax = cfg.APP.MaxPeers
|
||||
config.PeerConnTmout = cfg.APP.PeerConnTmout
|
||||
@ -313,20 +313,20 @@ func client_main(ctl_addrs []string, rpc_addrs []string, route_configs []string,
|
||||
}
|
||||
}
|
||||
|
||||
if xterm_pts_html_file != "" {
|
||||
if xterm_html_file != "" {
|
||||
var tmp []byte
|
||||
tmp, err = os.ReadFile(xterm_pts_html_file)
|
||||
tmp, err = os.ReadFile(xterm_html_file)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read %s - %s", xterm_pts_html_file, err.Error())
|
||||
return fmt.Errorf("failed to read %s - %s", xterm_html_file, err.Error())
|
||||
}
|
||||
xterm_pts_html = string(tmp)
|
||||
xterm_html = string(tmp)
|
||||
}
|
||||
|
||||
c = hodu.NewClient(context.Background(), HODU_NAME, logger, config)
|
||||
|
||||
if pts_user != "" { c.SetPtsUser(pts_user) }
|
||||
if pts_shell != "" { c.SetPtsShell(pts_shell) }
|
||||
if xterm_pts_html != "" { c.SetXtermPtsHtml(xterm_pts_html) }
|
||||
if xterm_html != "" { c.SetXtermHtml(xterm_html) }
|
||||
|
||||
c.StartService(&cc)
|
||||
c.StartCtlService() // control channel
|
||||
|
Reference in New Issue
Block a user