From 9632f5244878305a5dd4ae21e4567b06607bdb67 Mon Sep 17 00:00:00 2001 From: hilschernetpi Date: Fri, 4 Sep 2020 07:56:43 +0000 Subject: [PATCH] connect to host dbus if mapped --- Dockerfile | 2 +- init.d/entrypoint.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d98dfa..7e6457f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.vcs-ref=$VCS_REF #version -ENV HILSCHERNETPI_NODERED_VERSION 1.6.2 +ENV HILSCHERNETPI_NODERED_VERSION 1.6.3 #labeling LABEL maintainer="netpi@hilscher.com" \ diff --git a/init.d/entrypoint.sh b/init.d/entrypoint.sh index 57ad9a8..d71d79c 100755 --- a/init.d/entrypoint.sh +++ b/init.d/entrypoint.sh @@ -16,8 +16,11 @@ else ip link delete dummy0 >/dev/null 2>&1 fi -# start dbus as background task -/etc/init.d/dbus start +# check if dbus address is already defined -> then dbus-deamon of host shall be used +if [[ ! -d "/var/run/dbus/system_bus_socket" ]]; then + # else start a dbus daemon instance in the container + /etc/init.d/dbus start +fi pidbt=0 @@ -34,8 +37,9 @@ term_handler() { fi echo "terminating dbus ..." - /etc/init.d/dbus stop - + if [[ ! -d "/var/run/dbus/system_bus_socket" ]]; then + /etc/init.d/dbus stop + fi exit 143; # 128 + 15 -- SIGTERM }