From e479ff1a1b8f649ea97fdfd37765039a6c580141 Mon Sep 17 00:00:00 2001 From: DanB Date: Fri, 27 Apr 2018 15:51:28 +0200 Subject: [PATCH] Disable default cgr-loader.cfg config path --- cmd/cgr-loader/cgr-loader.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/cgr-loader/cgr-loader.go b/cmd/cgr-loader/cgr-loader.go index d9371f7a5..6e314e4b7 100755 --- a/cmd/cgr-loader/cgr-loader.go +++ b/cmd/cgr-loader/cgr-loader.go @@ -69,7 +69,7 @@ var ( disable_reverse = flag.Bool("disable_reverse_mappings", false, "Will disable reverse mappings rebuilding") flush_stordb = flag.Bool("flush_stordb", false, "Remove tariff plan data for id from the database") remove = flag.Bool("remove", false, "Will remove any data from db that matches data files") - config_path = flag.String("config_path", "/etc/cgrates/cgr-loader.cfg", "Full path towards configuration file") + config_path = flag.String("config_path", "", "Full path towards configuration file") ) func main() { @@ -85,9 +85,12 @@ func main() { var rater, cdrstats, users rpcclient.RpcClientConnection var loader engine.LoadReader - lCfg, err := config.NewLoaderConfig(*config_path) - if err != nil { - log.Fatalf("Error loading config file: %v", err) + lCfg := config.NewDefaultLoaderConfig() + if *config_path != "" { + lCfg, err = config.NewLoaderConfig(*config_path) + if err != nil { + log.Fatalf("Error loading config file: %v", err) + } } if *datadb_type != "" {