summaryrefslogtreecommitdiff
path: root/src/charon-systemd
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2017-04-01 16:26:44 +0200
committerYves-Alexis Perez <corsac@corsac.net>2017-04-01 16:26:44 +0200
commit05ddd767992d68bb38c7f16ece142e8c2e9ae016 (patch)
tree302c618be306d4ed3c7f9fc58a1f6aaad4dd252f /src/charon-systemd
parent25663e04c3ab01ef8dc9f906608282319cfea2db (diff)
downloadvyos-strongswan-05ddd767992d68bb38c7f16ece142e8c2e9ae016.tar.gz
vyos-strongswan-05ddd767992d68bb38c7f16ece142e8c2e9ae016.zip
New upstream version 5.5.2
Diffstat (limited to 'src/charon-systemd')
-rw-r--r--src/charon-systemd/Makefile.in2
-rw-r--r--src/charon-systemd/charon-systemd.c18
2 files changed, 18 insertions, 2 deletions
diff --git a/src/charon-systemd/Makefile.in b/src/charon-systemd/Makefile.in
index c1aa833b0..1959818c4 100644
--- a/src/charon-systemd/Makefile.in
+++ b/src/charon-systemd/Makefile.in
@@ -331,7 +331,6 @@ exec_prefix = @exec_prefix@
fips_mode = @fips_mode@
gtk_CFLAGS = @gtk_CFLAGS@
gtk_LIBS = @gtk_LIBS@
-h_plugins = @h_plugins@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -366,6 +365,7 @@ nm_LIBS = @nm_LIBS@
nm_ca_dir = @nm_ca_dir@
nm_plugins = @nm_plugins@
oldincludedir = @oldincludedir@
+p_plugins = @p_plugins@
pcsclite_CFLAGS = @pcsclite_CFLAGS@
pcsclite_LIBS = @pcsclite_LIBS@
pdfdir = @pdfdir@
diff --git a/src/charon-systemd/charon-systemd.c b/src/charon-systemd/charon-systemd.c
index 5c7bbd779..60e509ffb 100644
--- a/src/charon-systemd/charon-systemd.c
+++ b/src/charon-systemd/charon-systemd.c
@@ -241,6 +241,7 @@ static int run()
sigset_t set;
sigemptyset(&set);
+ sigaddset(&set, SIGHUP);
sigaddset(&set, SIGTERM);
sigprocmask(SIG_BLOCK, &set, NULL);
@@ -262,6 +263,21 @@ static int run()
}
switch (sig)
{
+ case SIGHUP:
+ {
+ DBG1(DBG_DMN, "signal of type SIGHUP received. Reloading "
+ "configuration");
+ if (lib->settings->load_files(lib->settings, lib->conf, FALSE))
+ {
+ charon->load_loggers(charon);
+ lib->plugins->reload(lib->plugins, NULL);
+ }
+ else
+ {
+ DBG1(DBG_DMN, "reloading config failed, keeping old");
+ }
+ break;
+ }
case SIGTERM:
{
DBG1(DBG_DMN, "SIGTERM received, shutting down");
@@ -374,7 +390,7 @@ int main(int argc, char *argv[])
sd_notifyf(0, "STATUS=unknown uid/gid");
return SS_RC_INITIALIZATION_FAILED;
}
- charon->load_loggers(charon, NULL, FALSE);
+ charon->load_loggers(charon);
lib->plugins->add_static_features(lib->plugins, lib->ns, features,
countof(features), TRUE, journal_reload, &journal);