25 |
switch (sig) |
switch (sig) |
26 |
{ |
{ |
27 |
case SIGHUP: |
case SIGHUP: |
28 |
Logger::logMessage("hangup signal catched"); |
Logger::logMessage("Reload config"); |
29 |
|
Common::instance()->reloadConfig = true; |
30 |
|
|
31 |
break; |
break; |
32 |
|
|
33 |
case SIGTERM: |
case SIGTERM: |
46 |
{ |
{ |
47 |
Common* cmn = Common::instance(); |
Common* cmn = Common::instance(); |
48 |
|
|
49 |
std::string userstr = cmn->GetConfigfile()->GetValue("smsdaemon","user"); |
std::string userstr = cmn->GetConfigfile()->GetValue("smsdaemon","user",""); |
50 |
std::string groupstr = cmn->GetConfigfile()->GetValue("smsdaemon","group"); |
std::string groupstr = cmn->GetConfigfile()->GetValue("smsdaemon","group",""); |
51 |
|
|
52 |
passwd* pass = getpwnam(userstr.c_str()); |
passwd* pass = getpwnam(userstr.c_str()); |
53 |
if (pass != 0) |
if (pass != 0) |