mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
use system folders if run as service
This commit is contained in:
parent
2cd8d0c0b7
commit
02c51b0980
5 changed files with 18 additions and 5 deletions
|
@ -74,7 +74,7 @@ namespace i2p
|
|||
}
|
||||
|
||||
// Pidfile
|
||||
pidfile = i2p::util::filesystem::GetDataDir().string();
|
||||
pidfile = IsService () ? "/var/run" : i2p::util::filesystem::GetDataDir().string();
|
||||
pidfile.append("/i2pd.pid");
|
||||
pidFilehandle = open(pidfile.c_str(), O_RDWR | O_CREAT, 0600);
|
||||
if (pidFilehandle == -1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue