mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-02-17 04:34:19 +01:00
Extract pid file name to global defs
This commit is contained in:
parent
17af032279
commit
95b7e51c30
|
|
@ -2,22 +2,28 @@
|
|||
#define __GLOBAL_DEFS__
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#define DATA_DIR "/opt/mmdvm/conf/dstar"
|
||||
#define LOG_DIR "/opt/mmdvm/logs"
|
||||
#define CONF_DIR "/opt/mmdvm/conf"
|
||||
#define CONF_FILE "ircDDBGateway.ini"
|
||||
#define DATA_DIR "/opt/mmdvm/conf/dstar"
|
||||
#define LOG_DIR "/opt/mmdvm/logs"
|
||||
#define CONF_DIR "/opt/mmdvm/conf"
|
||||
#define CONF_FILE "ircDDBGateway.ini"
|
||||
#define PID_FILE "/tmp/ircDDBGateway.pid"
|
||||
#define PID_FILE_T "/tmp/ircDDBGateway_%s.pid"
|
||||
|
||||
#elif defined(OPENWRT) && OPENWRT == 1
|
||||
#define DATA_DIR "/etc/mmdvm/dstar"
|
||||
#define LOG_DIR "/var/log/mmdvm"
|
||||
#define CONF_DIR "/etc"
|
||||
#define CONF_FILE "ircDDBGateway.ini"
|
||||
#define DATA_DIR "/etc/mmdvm/dstar"
|
||||
#define LOG_DIR "/var/log/mmdvm"
|
||||
#define CONF_DIR "/etc"
|
||||
#define CONF_FILE "ircDDBGateway.ini"
|
||||
#define PID_FILE "/tmp/ircDDBGateway.pid"
|
||||
#define PID_FILE_T "/tmp/ircDDBGateway_%s.pid"
|
||||
|
||||
#else
|
||||
#define DATA_DIR "/usr/share/ircddbgateway"
|
||||
#define LOG_DIR "/tmp"
|
||||
#define CONF_DIR "/etc"
|
||||
#define CONF_FILE "ircddbgateway"
|
||||
#define DATA_DIR "/usr/share/ircddbgateway"
|
||||
#define LOG_DIR "/tmp"
|
||||
#define CONF_DIR "/etc"
|
||||
#define CONF_FILE "ircddbgateway"
|
||||
#define PID_FILE "/tmp/ircddbgateway.pid"
|
||||
#define PID_FILE_T "/tmp/ircddbgateway_%s.pid"
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -124,9 +124,9 @@ int main(int argc, char** argv)
|
|||
|
||||
wxString pidFileName;
|
||||
if (!name.IsEmpty())
|
||||
pidFileName.Printf(wxT("/var/run/opendv/ircddbgateway_%s.pid"), name.c_str());
|
||||
pidFileName.Printf(wxT(PID_FILE_T), name.c_str());
|
||||
else
|
||||
pidFileName = wxT("/var/run/opendv/ircddbgateway.pid");
|
||||
pidFileName = wxT(PID_FILE);
|
||||
pidFileName.Replace(wxT(" "), wxT("_"));
|
||||
|
||||
char fileName[128U];
|
||||
|
|
|
|||
Loading…
Reference in a new issue