Exemplo n.º 1
0
func InitDtcmS(fcfg *util.Fcfg, dbc dtm.DB_C, h dtm.DTCM_S_H) error {
	var ffprobe_c = fcfg.Val("ffprobe_c")
	if len(ffprobe_c) > 0 {
		FFPROBE_C = ffprobe_c
	}
	var err error
	SRV, err = dtm.StartDTCM_S(fcfg, dbc, h)
	return err
}
Exemplo n.º 2
0
func RunFFCM_S_V(fcfg *util.Fcfg) error {
	if SRV == nil {
		return util.Err("server is not running")
	}
	var listen = fcfg.Val("listen")
	SRV.Hand("", routing.Shared)
	routing.Shared.Print()
	log.D("listen web server on %v", listen)
	return routing.ListenAndServe(listen)
}
Exemplo n.º 3
0
Arquivo: ffcm.go Projeto: Centny/ffcm
func redirect_l(fcfg *util.Fcfg) {
	var out_l = fcfg.Val2("out_l", "")
	var err_l = fcfg.Val2("err_l", "")
	fmt.Printf("redirect stdout to file(%v) and stderr to file(%v)\n", out_l, err_l)
	if len(out_l) > 0 {
		smartio.RedirectStdout3(out_l)
	}
	if len(err_l) > 0 {
		smartio.RedirectStderr3(err_l)
	}
	log.SetWriter(os.Stdout)
}