From 3a0868feb48fbe004942ed84bf7bea000428de82 Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Mon, 15 Jul 2024 01:20:39 +0200 Subject: implement turnstile-style services --- .config/service/dbus/run | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 .config/service/dbus/run (limited to '.config/service/dbus') diff --git a/.config/service/dbus/run b/.config/service/dbus/run new file mode 100755 index 0000000..a183643 --- /dev/null +++ b/.config/service/dbus/run @@ -0,0 +1,13 @@ +#!/bin/sh +exec 2>&1 + +[ -r ./conf ] && . ./conf + +: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/bus}" +. "$HOME/.config/common_service.sh" + +if [ -d "$TURNSTILE_ENV_DIR" ]; then + echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS +fi + +exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS -- cgit v1.2.3