#!/bin/sh set -eu mkdir -p /run/dbus # Clean up stale pid file, if present. pidfile=/run/dbus/dbus.pid pid=$(cat "$pidfile" || true) if [ -n "$pid" ] && ! [ -d "/proc/$pid" ]; then echo >&2 "Removing stale PID file $pidfile" rm -f "$pidfile" fi