diff options
author | Luca Matei Pintilie <luca@lucamatei.com> | 2024-07-14 23:20:39 +0000 |
---|---|---|
committer | Luca Matei Pintilie <luca@lucamatei.com> | 2024-07-14 23:20:39 +0000 |
commit | 3a0868feb48fbe004942ed84bf7bea000428de82 (patch) | |
tree | 1bf67ee83c49cfc4d70acacedd0ff4a6bc977ede /.config/service/dbus/run | |
parent | 106067ed048a684da33669eff984bd8b98f554a2 (diff) | |
download | dotfiles-3a0868feb48fbe004942ed84bf7bea000428de82.tar dotfiles-3a0868feb48fbe004942ed84bf7bea000428de82.tar.gz dotfiles-3a0868feb48fbe004942ed84bf7bea000428de82.tar.bz2 dotfiles-3a0868feb48fbe004942ed84bf7bea000428de82.tar.lz dotfiles-3a0868feb48fbe004942ed84bf7bea000428de82.tar.xz dotfiles-3a0868feb48fbe004942ed84bf7bea000428de82.tar.zst dotfiles-3a0868feb48fbe004942ed84bf7bea000428de82.zip |
implement turnstile-style services
Diffstat (limited to '.config/service/dbus/run')
-rwxr-xr-x | .config/service/dbus/run | 13 |
1 files changed, 13 insertions, 0 deletions
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 |