From ee21a3010760b6baeda0f23ea9b1ad96fe12413e Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 8 Jul 2020 00:33:21 -0500 Subject: [PATCH] Implement nest detection --- README.md | 1 + firestarter | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 3c45b60..627c9f1 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Firestarter, in addition to spawning the programs in the default configs, also i | 52 | Failed to create configuration directory | | 53 | Failed to create logging directory | | 54 | `HOME` does not exist or is unreadable | +| 55 | Firestarter is already running | | 70 | No configuration files available | ## Idiosyncracies diff --git a/firestarter b/firestarter index 7530b39..b7799cf 100755 --- a/firestarter +++ b/firestarter @@ -150,6 +150,8 @@ step_preexecute() { [ -n "$_optdryrun" ] && return 0 [ -r "$HOME/.xsessionrc" ] && . "$HOME/.xsessionrc" export XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-firestarter}" + [ -n "$FIRESTARTER" ] && error "Firestarter is already running: $FIRESTARTER" 55 + export FIRESTARTER="$BASHPID" # dbus if \ [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && \