From 07e32739d08f2d10f18a0a27e16cd7137f019cba Mon Sep 17 00:00:00 2001 From: Tobias K <6317548+theCalcaholic@users.noreply.github.com> Date: Mon, 18 Apr 2022 18:25:29 +0200 Subject: metrics.sh: Fix docker detection issue Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com> --- bin/ncp/SYSTEM/metrics.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ncp/SYSTEM/metrics.sh b/bin/ncp/SYSTEM/metrics.sh index 5aa7de30..50e46afd 100644 --- a/bin/ncp/SYSTEM/metrics.sh +++ b/bin/ncp/SYSTEM/metrics.sh @@ -101,7 +101,7 @@ EOF # shellcheck disable=SC2016 sed -i 's|status_of_proc "$DAEMON" "$NAME" ${PIDFILE:="-p ${PIDFILE}"}|status_of_proc ${PIDFILE:+-p "$PIDFILE"} "$DAEMON" "$NAME"|' /lib/init/init-d-script - if [[ "$DOCKERBUILD" == 1 ]] + if is_docker then # during installation of prometheus-node-exporter `useradd` is used to create a user. # However, `useradd` doesn't the symlink in /etc/shadow, so we need to temporarily move it back @@ -116,7 +116,7 @@ EOF apt_install_with_recommends prometheus-node-exporter fi - if [[ "$DOCKERBUILD" == 1 ]] + if is_docker then cat > /etc/init.d/ncp-metrics-exporter <<'EOF' #!/bin/sh -- cgit v1.2.3