mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-23 13:24:20 +00:00
* rename i2p.conf -> i2pd.conf, add detection of old config
This commit is contained in:
parent
0bb89de821
commit
8437d45866
@ -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)")
|
||||
|
14
Daemon.cpp
14
Daemon.cpp
@ -69,11 +69,19 @@ namespace i2p
|
||||
i2p::fs::Init();
|
||||
|
||||
datadir = i2p::fs::GetDataDir();
|
||||
if (config == "")
|
||||
// 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
2
debian/i2pd.1
vendored
@ -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
2
debian/i2pd.links
vendored
@ -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,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
|
||||
|
||||
For example:
|
||||
|
||||
i2p.conf:
|
||||
i2pd.conf:
|
||||
|
||||
# comment
|
||||
log = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user