Leonid Plyushch
5 years ago
3 changed files with 79 additions and 1 deletions
@ -0,0 +1,43 @@ |
|||||
|
diff -uNr i2pd-2.31.0/contrib/i2pd.conf i2pd-2.31.0.mod/contrib/i2pd.conf
|
||||
|
--- i2pd-2.31.0/contrib/i2pd.conf 2020-04-10 20:33:54.000000000 +0300
|
||||
|
+++ i2pd-2.31.0.mod/contrib/i2pd.conf 2020-05-08 01:04:37.465748132 +0300
|
||||
|
@@ -7,16 +7,16 @@
|
||||
|
## by removing the "#" symbol. |
||||
|
|
||||
|
## Tunnels config file |
||||
|
-## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf
|
||||
|
-# tunconf = /var/lib/i2pd/tunnels.conf
|
||||
|
+## Default: ~/.i2pd/tunnels.conf or @TERMUX_PREFIX@/etc/i2pd/tunnels.conf
|
||||
|
+tunconf = @TERMUX_PREFIX@/etc/i2pd/tunnels.conf
|
||||
|
|
||||
|
## Tunnels config files path |
||||
|
## Use that path to store separated tunnels in different config files. |
||||
|
-## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d
|
||||
|
-# tunnelsdir = /var/lib/i2pd/tunnels.conf.d
|
||||
|
+## Default: ~/.i2pd/tunnels.d or @TERMUX_PREFIX@/etc/i2pd/tunnels.d
|
||||
|
+# tunnelsdir = @TERMUX_PREFIX@/etc/i2pd/tunnels.conf.d
|
||||
|
|
||||
|
## Where to write pidfile (don't write by default) |
||||
|
-# pidfile = /var/run/i2pd.pid
|
||||
|
+# pidfile = @TERMUX_PREFIX@/var/run/i2pd.pid
|
||||
|
|
||||
|
## Logging configuration section |
||||
|
## By default logs go to stdout with level 'info' and higher |
||||
|
@@ -27,7 +27,7 @@
|
||||
|
## * syslog - use syslog, see man 3 syslog |
||||
|
# log = file |
||||
|
## Path to logfile (default - autodetect) |
||||
|
-# logfile = /var/log/i2pd.log
|
||||
|
+# logfile = @TERMUX_PREFIX@/var/log/i2pd.log
|
||||
|
## Log messages above this level (debug, *info, warn, error, none) |
||||
|
## If you set it to none, logging will be disabled |
||||
|
# loglevel = info |
||||
|
@@ -69,7 +69,7 @@
|
||||
|
# ssu = true |
||||
|
|
||||
|
## Should we assume we are behind NAT? (false only in MeshNet) |
||||
|
-# nat = true
|
||||
|
+nat = true
|
||||
|
|
||||
|
## Bandwidth configuration |
||||
|
## L limit bandwidth to 32KBs/sec, O - to 256KBs/sec, P - to 2048KBs/sec, |
@ -0,0 +1,35 @@ |
|||||
|
diff -uNr i2pd-2.31.0/libi2pd/Config.cpp i2pd-2.31.0.mod/libi2pd/Config.cpp
|
||||
|
--- i2pd-2.31.0/libi2pd/Config.cpp 2020-04-10 20:33:54.000000000 +0300
|
||||
|
+++ i2pd-2.31.0.mod/libi2pd/Config.cpp 2020-05-08 01:08:43.276186146 +0300
|
||||
|
@@ -33,10 +33,10 @@
|
||||
|
general.add_options() |
||||
|
("help", "Show this message") |
||||
|
("version", "Show i2pd version") |
||||
|
- ("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.conf or /var/lib/i2pd/tunnels.conf)")
|
||||
|
- ("tunnelsdir", value<std::string>()->default_value(""), "Path to extra tunnels' configs folder (default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d")
|
||||
|
- ("pidfile", value<std::string>()->default_value(""), "Path to pidfile (default: ~/i2pd/i2pd.pid or /var/lib/i2pd/i2pd.pid)")
|
||||
|
+ ("conf", value<std::string>()->default_value(""), "Path to main i2pd config file (default: try ~/.i2pd/i2pd.conf or @TERMUX_PREFIX@/etc/i2pd/i2pd.conf)")
|
||||
|
+ ("tunconf", value<std::string>()->default_value(""), "Path to config with tunnels list and options (default: try ~/.i2pd/tunnels.conf or @TERMUX_PREFIX@/etc/i2pd/tunnels.conf)")
|
||||
|
+ ("tunnelsdir", value<std::string>()->default_value(""), "Path to extra tunnels' configs folder (default: ~/.i2pd/tunnels.d or @TERMUX_PREFIX@/etc/i2pd/tunnels.d")
|
||||
|
+ ("pidfile", value<std::string>()->default_value(""), "Path to pidfile (default: ~/i2pd/i2pd.pid or @TERMUX_PREFIX@/var/run/i2pd.pid)")
|
||||
|
("log", value<std::string>()->default_value(""), "Logs destination: stdout, file, syslog (stdout if not set)") |
||||
|
("logfile", value<std::string>()->default_value(""), "Path to logfile (stdout if not set, autodetect if daemon)") |
||||
|
("loglevel", value<std::string>()->default_value("info"), "Set the minimal level of log messages (debug, info, warn, error, none)") |
||||
|
diff -uNr i2pd-2.31.0/libi2pd/FS.cpp i2pd-2.31.0.mod/libi2pd/FS.cpp
|
||||
|
--- i2pd-2.31.0/libi2pd/FS.cpp 2020-04-10 20:33:54.000000000 +0300
|
||||
|
+++ i2pd-2.31.0.mod/libi2pd/FS.cpp 2020-05-08 01:07:13.007295667 +0300
|
||||
|
@@ -100,11 +100,11 @@
|
||||
|
// otherwise use /data/files |
||||
|
char *home = getenv("HOME"); |
||||
|
if (isService) { |
||||
|
- dataDir = "/var/lib/" + appName;
|
||||
|
+ dataDir = "@TERMUX_PREFIX@/var/lib/" + appName;
|
||||
|
} else if (home != NULL && strlen(home) > 0) { |
||||
|
dataDir = std::string(home) + "/." + appName; |
||||
|
} else { |
||||
|
- dataDir = "/tmp/" + appName;
|
||||
|
+ dataDir = "@TERMUX_PREFIX@/tmp/" + appName;
|
||||
|
} |
||||
|
return; |
||||
|
#endif |
Loading…
Reference in new issue