diff --git a/ClientContext.cpp b/ClientContext.cpp index 8c626b25..ccb8e0ad 100644 --- a/ClientContext.cpp +++ b/ClientContext.cpp @@ -261,8 +261,15 @@ namespace client { boost::property_tree::ptree pt; std::string tunConf; i2p::config::GetOption("tunconf", tunConf); - if (tunConf == "") + if (tunConf == "") { + // TODO: cleanup this in 2.8.0 tunConf = i2p::fs::DataDirPath ("tunnels.cfg"); + if (i2p::fs::Exists(tunConf)) { + LogPrint(eLogWarning, "FS: please rename tunnels.cfg -> tunnels.conf here: ", tunConf); + } else { + tunConf = i2p::fs::DataDirPath ("tunnels.conf"); + } + } LogPrint(eLogDebug, "FS: tunnels config file: ", tunConf); try { diff --git a/Config.cpp b/Config.cpp index f9cf2477..1dc1207f 100644 --- a/Config.cpp +++ b/Config.cpp @@ -108,7 +108,7 @@ namespace config { general.add_options() ("help", "Show this message") ("conf", value()->default_value(""), "Path to main i2pd config file (default: try ~/.i2pd/i2pd.conf or /var/lib/i2pd/i2pd.conf)") - ("tunconf", value()->default_value(""), "Path to config with tunnels list and options (default: try ~/.i2pd/tunnels.cfg or /var/lib/i2pd/tunnels.cfg)") + ("tunconf", value()->default_value(""), "Path to config with tunnels list and options (default: try ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf)") ("pidfile", value()->default_value(""), "Path to pidfile (default: ~/i2pd/i2pd.pid or /var/lib/i2pd/i2pd.pid)") ("log", value()->default_value(""), "Logs destination: stdout, file, syslog (stdout if not set)") ("logfile", value()->default_value(""), "Path to logfile (stdout if not set, autodetect if daemon)") diff --git a/debian/i2pd.links b/debian/i2pd.links index 58a75552..e8e2473b 100644 --- a/debian/i2pd.links +++ b/debian/i2pd.links @@ -1,4 +1,4 @@ etc/i2pd/i2pd.conf var/lib/i2pd/i2pd.conf -etc/i2pd/tunnels.conf var/lib/i2pd/tunnels.cfg +etc/i2pd/tunnels.conf var/lib/i2pd/tunnels.conf etc/i2pd/subscriptions.txt var/lib/i2pd/subscriptions.txt usr/share/i2pd/certificates var/lib/i2pd/certificates diff --git a/docs/configuration.md b/docs/configuration.md index 3d03b1c7..18d30017 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -7,7 +7,7 @@ Command line options * --conf= - Config file (default: ~/.i2pd/i2pd.conf or /var/lib/i2pd/i2pd.conf) This parameter will be silently ignored if the specified config file does not exist. Options specified on the command line take precedence over those in the config file. -* --tunconf= - Tunnels config file (default: ~/.i2pd/tunnels.cfg or /var/lib/i2pd/tunnels.cfg) +* --tunconf= - Tunnels config file (default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf) * --pidfile= - Where to write pidfile (dont write by default) * --log= - Logs destination: stdout, file (stdout if not set, file - otherwise, for compatibility) * --logfile= - Path to logfile (default - autodetect) @@ -73,7 +73,7 @@ i2pd.conf: [sam] enabled = true -tunnels.cfg (filename of this config is subject of change): +tunnels.conf # outgoing tunnel sample, to remote service # mandatory parameters: diff --git a/docs/i2pd.conf b/docs/i2pd.conf index 9bbc73fa..81bcc634 100644 --- a/docs/i2pd.conf +++ b/docs/i2pd.conf @@ -7,8 +7,8 @@ ## by removing the "#" symbol. ## Tunnels config file -## Default: ~/.i2pd/tunnels.cfg or /var/lib/i2pd/tunnels.cfg -#tunconf = /var/lib/i2pd/tunnels.cfg +## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf +#tunconf = /var/lib/i2pd/tunnels.conf ## Where to write pidfile (don't write by default) #pidfile = /var/run/i2pd.pid