BUILD/MINOR: systemd: fix compiler warning about unused result

BUILD/MINOR: systemd: fix compiler warning about unused result

There is a compiler warning after commit 1b6e75fa84 ("MEDIUM: haproxy-
systemd-wrapper: Use haproxy in same directory"):

src/haproxy-systemd-wrapper.c: In function âlocate_haproxyâ:
src/haproxy-systemd-wrapper.c:28:10: warning: ignoring return value of âreadlinkâ, declared with attribute warn_unused_result [-Wunused-result]

Fix the compiler warning by checking the return value of readlink().
BUG/MEDIUM: systemd-wrapper: fix locating of haproxy binary

BUG/MEDIUM: systemd-wrapper: fix locating of haproxy binary

OpenBSD complains this way due to strncat() :

src/haproxy-systemd-wrapper.o(.text+0xd5): In function `spawn_haproxy':
src/haproxy-systemd-wrapper.c:33: warning: strcat() is almost always misused, please use strlcat()

In fact, the code before strncat() here is wrong, because it may
dereference a NULL if /proc/self/exe is not readable. So fix it
and get rid of strncat() at the same time.

No backport is needed.
MINOR: systemd wrapper: re-execute on SIGUSR2

MINOR: systemd wrapper: re-execute on SIGUSR2

Re-execute the systemd wrapper on SIGUSR2 and before reloading HAProxy,
making it possible to load a completely new version of HAProxy
(including a new version of the systemd wrapper) gracefully.
Since the wrapper accepts no command-line arguments of its own,
re-execution is signaled using the HAPROXY_SYSTEMD_REEXEC environment
variable.

This is primarily intended to help seamless upgrades of distribution
packages.
MINOR: systemd wrapper: improve logging

MINOR: systemd wrapper: improve logging

Use standard error for logging messages, as it seems that this gets
messages to the systemd journal more reliably. Also use systemd's
support for specifying log levels via stderr to apply different levels
to messages.
MINOR: systemd wrapper: propagate exit status

MINOR: systemd wrapper: propagate exit status

Use HAProxy's exit status as the systemd wrapper's exit status instead
of always returning EXIT_SUCCESS, permitting the use of systemd's
`Restart = on-failure' logic.