diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
commit | 56ae875861ab260b80a030f50c4aff9f9dc8fff0 (patch) | |
tree | 531412110fc901a5918c7f7442202804a83cada9 /icinga-app/icinga2.cmake | |
parent | Initial commit. (diff) | |
download | icinga2-56ae875861ab260b80a030f50c4aff9f9dc8fff0.tar.xz icinga2-56ae875861ab260b80a030f50c4aff9f9dc8fff0.zip |
Adding upstream version 2.14.2.upstream/2.14.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'icinga-app/icinga2.cmake')
-rw-r--r-- | icinga-app/icinga2.cmake | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/icinga-app/icinga2.cmake b/icinga-app/icinga2.cmake new file mode 100644 index 0000000..f55f22a --- /dev/null +++ b/icinga-app/icinga2.cmake @@ -0,0 +1,29 @@ +#!/bin/sh +ICINGA2_BIN=@CMAKE_INSTALL_FULL_LIBDIR@/icinga2/sbin/icinga2 + +if test "x`uname -s`" = "xLinux" -a "x$1" = "xconsole"; then + libedit_line=`ldd $ICINGA2_BIN 2>&1 | grep libedit` + if test $? -eq 0; then + libedit_path=`echo $libedit_line | cut -f3 -d' '` + if test -n "$libedit_path"; then + libdir=`dirname -- $libedit_path` + found=0 + for libreadline_path in `ls -1r -- $libdir/libreadline.so.* 2>/dev/null`; do + found=1 + break + done + if test $found -eq 0; then + libdir2=/`echo $libdir | cut -f3- -d/` + for libreadline_path in `ls -1r -- $libdir2/libreadline.so.* 2>/dev/null`; do + found=1 + break + done + fi + if test $found -gt 0; then + export LD_PRELOAD="$libreadline_path:$LD_PRELOAD" + fi + fi + fi +fi + +exec $ICINGA2_BIN "$@" |