Reload strongswan.conf and plugins supporting reloading on SIGHUP

This commit is contained in:
Martin Willi
2011-04-15 10:07:13 +02:00
parent fd3c12bf06
commit 3b71d3d033
+10 -1
View File
@@ -109,7 +109,16 @@ static void run()
{ {
case SIGHUP: case SIGHUP:
{ {
DBG1(DBG_DMN, "signal of type SIGHUP received. Ignored"); DBG1(DBG_DMN, "signal of type SIGHUP received. Reloading "
"configuration");
if (lib->settings->load_files(lib->settings, NULL, FALSE))
{
lib->plugins->reload(lib->plugins, NULL);
}
else
{
DBG1(DBG_DMN, "reloading config failed, keeping old");
}
break; break;
} }
case SIGINT: case SIGINT: