Browse Source

* rename i2p.conf -> i2pd.conf, add detection of old config

pull/448/head
hagen 9 years ago
parent
commit
8437d45866
  1. 2
      Config.cpp
  2. 12
      Daemon.cpp
  3. 2
      debian/i2pd.1
  4. 2
      debian/i2pd.links
  5. 4
      docs/configuration.md
  6. 0
      docs/i2pd.conf

2
Config.cpp

@ -107,7 +107,7 @@ namespace config { @@ -107,7 +107,7 @@ namespace config {
options_description general("General options");
general.add_options()
("help", "Show this message")
("conf", value<std::string>()->default_value(""), "Path to main i2pd config file (default: try ~/.i2pd/i2p.conf or /var/lib/i2pd/i2p.conf)")
("conf", value<std::string>()->default_value(""), "Path to main i2pd config file (default: try ~/.i2pd/i2pd.conf or /var/lib/i2pd/i2pd.conf)")
("tunconf", value<std::string>()->default_value(""), "Path to config with tunnels list and options (default: try ~/.i2pd/tunnels.cfg or /var/lib/i2pd/tunnels.cfg)")
("pidfile", value<std::string>()->default_value(""), "Path to pidfile (default: ~/i2pd/i2pd.pid or /var/lib/i2pd/i2pd.pid)")
("log", value<std::string>()->default_value(""), "Logs destination: stdout, file, syslog (stdout if not set)")

12
Daemon.cpp

@ -69,11 +69,19 @@ namespace i2p @@ -69,11 +69,19 @@ namespace i2p
i2p::fs::Init();
datadir = i2p::fs::GetDataDir();
// TODO: drop old name detection in v2.8.0
if (config == "")
{
config = i2p::fs::DataDirPath("i2p.conf");
// use i2p.conf only if exists
if (!i2p::fs::Exists (config)) config = ""; /* reset */
if (i2p::fs::Exists (config)) {
LogPrint(eLogWarning, "Daemon: please rename i2p.conf to i2pd.conf here: ", config);
} else {
config = i2p::fs::DataDirPath("i2pd.conf");
if (!i2p::fs::Exists (config)) {
// use i2pd.conf only if exists
config = ""; /* reset */
}
}
}
i2p::config::ParseConfig(config);

2
debian/i2pd.1 vendored

@ -68,7 +68,7 @@ Port of BOB command channel. Usually \fI2827\fR. BOB will not be enabled if this @@ -68,7 +68,7 @@ Port of BOB command channel. Usually \fI2827\fR. BOB will not be enabled if this
Port of I2P control service. Usually \fI7650\fR. I2PControl will not be enabled if this is not set. (default: unset)
.TP
\fB\-\-conf=\fR
Config file (default: \fI~/.i2pd/i2p.conf\fR or \fI/var/lib/i2pd/i2p.conf\fR)
Config file (default: \fI~/.i2pd/i2pd.conf\fR or \fI/var/lib/i2pd/i2pd.conf\fR)
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.

2
debian/i2pd.links vendored

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
etc/i2pd/i2pd.conf var/lib/i2pd/i2p.conf
etc/i2pd/i2pd.conf var/lib/i2pd/i2pd.conf
etc/i2pd/tunnels.conf var/lib/i2pd/tunnels.cfg
etc/i2pd/subscriptions.txt var/lib/i2pd/subscriptions.txt
usr/share/i2pd/certificates var/lib/i2pd/certificates

4
docs/configuration.md

@ -4,7 +4,7 @@ i2pd configuration @@ -4,7 +4,7 @@ i2pd configuration
Command line options
--------------------
* --conf= - Config file (default: ~/.i2pd/i2p.conf or /var/lib/i2pd/i2p.conf)
* --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)
@ -60,7 +60,7 @@ All command-line parameters are allowed as keys, but note for those which contai @@ -60,7 +60,7 @@ All command-line parameters are allowed as keys, but note for those which contai
For example:
i2p.conf:
i2pd.conf:
# comment
log = true

0
docs/i2p.conf → docs/i2pd.conf

Loading…
Cancel
Save