mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-10-04 06:03:47 +00:00
Send corosync-notifyd startup notification to systemd
Signed-off-by: Ferenc Wágner <wferi@debian.org> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
parent
63601197ed
commit
188f9bdb1e
@ -7,7 +7,7 @@ After=corosync.service
|
||||
[Service]
|
||||
EnvironmentFile=-@INITCONFIGDIR@/corosync-notifyd
|
||||
ExecStart=@SBINDIR@/corosync-notifyd -f $OPTIONS
|
||||
Type=simple
|
||||
Type=notify
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
|
@ -67,8 +67,9 @@ corosync_quorumtool_LDADD = $(LIBQB_LIBS) \
|
||||
$(top_builddir)/lib/libquorum.la \
|
||||
$(top_builddir)/lib/libvotequorum.la
|
||||
|
||||
corosync_notifyd_CFLAGS = $(DBUS_CFLAGS)
|
||||
corosync_notifyd_CFLAGS = $(DBUS_CFLAGS) $(libsystemd_CFLAGS)
|
||||
corosync_notifyd_LDADD = $(LIBQB_LIBS) $(DBUS_LIBS) $(SNMP_LIBS) \
|
||||
$(libsystemd_LIBS) \
|
||||
$(top_builddir)/lib/libcmap.la \
|
||||
$(top_builddir)/lib/libcfg.la \
|
||||
$(top_builddir)/lib/libquorum.la
|
||||
|
@ -60,6 +60,10 @@
|
||||
#include <corosync/quorum.h>
|
||||
#include <corosync/cmap.h>
|
||||
|
||||
#ifdef HAVE_LIBSYSTEMD
|
||||
#include <systemd/sd-daemon.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* generic declarations
|
||||
*/
|
||||
@ -1318,6 +1322,10 @@ main(int argc, char *argv[])
|
||||
sig_exit_handler,
|
||||
NULL);
|
||||
|
||||
#ifdef HAVE_LIBSYSTEMD
|
||||
sd_notify (0, "READY=1");
|
||||
#endif
|
||||
|
||||
qb_loop_run(main_loop);
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
|
Loading…
Reference in New Issue
Block a user