* migrate to new settings

This commit is contained in:
hagen 2016-01-20 00:00:00 +00:00
parent 209934ad67
commit 2335d3879e
8 changed files with 109 additions and 77 deletions

View file

@ -8,10 +8,10 @@
#include <fcntl.h>
#include <sys/stat.h>
#include "Config.h"
#include "Log.h"
#include "util.h"
void handle_signal(int sig)
{
switch (sig)
@ -28,7 +28,6 @@ void handle_signal(int sig)
}
}
namespace i2p
{
namespace util
@ -74,7 +73,7 @@ namespace i2p
// Pidfile
// this code is c-styled and a bit ugly, but we need fd for locking pidfile
pidfile = i2p::util::config::GetArg("-pidfile", "");
std::string pidfile; i2p::config::GetOption("pidfile", pidfile);
if (pidfile == "") {
pidfile = IsService () ? "/var/run" : i2p::util::filesystem::GetDataDir().string();
pidfile.append("/i2pd.pid");
@ -120,7 +119,6 @@ namespace i2p
return Daemon_Singleton::stop();
}
}
}