aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-06-23 14:06:02 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-06-23 14:06:02 +0200
commit474616e64fe081a59ebdb7ee6d650778f318212a (patch)
tree5828c9cb2a090cfa535df9cb45d599977a218a9b
parent9fa72fb3042cf63055768564023eb94c39d6c75c (diff)
Fix daemon reload (to be improved)
Change-Id: Ica099aa439e6c022de4982a58b0990065d932b0b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afm-user-daemon.c4
-rw-r--r--src/wgtpkg-unit.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/afm-user-daemon.c b/src/afm-user-daemon.c
index c75aadb..b20fe92 100644
--- a/src/afm-user-daemon.c
+++ b/src/afm-user-daemon.c
@@ -29,6 +29,7 @@
#include "verbose.h"
#include "utils-jbus.h"
#include "utils-json.h"
+#include "utils-systemd.h"
#include "afm.h"
#include "afm-launch-mode.h"
#ifdef LEGACY_MODE_WITHOUT_SYSTEMD
@@ -487,6 +488,9 @@ static void on_uninstall(struct sd_bus_message *smsg, const char *msg, void *unu
*/
static void on_signal_changed(struct json_object *obj, void *unused)
{
+ /* enforce daemon reload */
+ systemd_daemon_reload(1);
+
/* update the database */
#ifdef LEGACY_MODE_WITHOUT_SYSTEMD
afm_db_update_applications(afdb);
diff --git a/src/wgtpkg-unit.c b/src/wgtpkg-unit.c
index 232c4ee..e6e67bf 100644
--- a/src/wgtpkg-unit.c
+++ b/src/wgtpkg-unit.c
@@ -497,7 +497,7 @@ static int do_send_reload(const struct generatedesc *desc)
reloadusr = systemd_daemon_reload(1);
if (reloadsys)
reloadsys = systemd_daemon_reload(0);
- return reloadsys ? : reloadusr ? : 0;
+ return 0;
}
static int do_uninstall_units(void *closure, const struct generatedesc *desc)