From 8a3b2625e2916d28056c4b88eb38cc6d716548db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Sun, 1 Mar 2020 17:40:13 +0100 Subject: [PATCH] Remove pidfile on service --- scripts/bin/container-init | 7 +------ scripts/service/dbus-daemon/run | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/bin/container-init b/scripts/bin/container-init index c082d45..4332087 100755 --- a/scripts/bin/container-init +++ b/scripts/bin/container-init @@ -80,10 +80,5 @@ if [ ! -f "${RDP_TLS_KEY_PATH:?}" ] || [ ! -f "${RDP_TLS_CERT_PATH:?}" ]; then ) >/dev/null fi -# Remove dbus pidfile -if [ -e /run/dbus/pid ]; then - rm -f /run/dbus/pid -fi - -# Start all services +# Start runit exec tini -- runsvdir -P /etc/service/ diff --git a/scripts/service/dbus-daemon/run b/scripts/service/dbus-daemon/run index b0bad27..7b9388a 100755 --- a/scripts/service/dbus-daemon/run +++ b/scripts/service/dbus-daemon/run @@ -1,4 +1,8 @@ #!/bin/sh +if [ -e /run/dbus/pid ]; then + rm -f /run/dbus/pid +fi + exec 2>&1 exec /usr/bin/chpst -u messagebus /usr/bin/dbus-daemon --system --nofork