From 2a3ecca2dc74ad294d7ff251524b9d0b8695974e Mon Sep 17 00:00:00 2001 From: Salt Date: Fri, 21 Jun 2019 17:32:28 -0500 Subject: [PATCH] Add nesting checks, remove all references to X --- firestarter | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/firestarter b/firestarter index cff8895..e455f6e 100755 --- a/firestarter +++ b/firestarter @@ -158,7 +158,7 @@ mate-settings-daemon command -v gnome-settings-daemon gnome-settings-daemon EOF - # X system statistics glances + # System statistics glances cat << EOF > "$_configdir/stat-glances" [ -z "\$DISPLAY" ] : @@ -259,6 +259,12 @@ Licensed under the MIT License https://gitlab.com/rehashedsalt/firestarter EOF } +step_check() { + if pgrep firestarter > /dev/null 2>&1 && [ -z "$dryrun" ]; then + err "Firestarter is already running" 61 + fi + return 0 +} step_preexecute() { # Special things that can't use simple configuration files [ "$dryrun" = "1" ] && return 0 @@ -424,6 +430,7 @@ main() { ;; esac done + step_check step_preexecute step_execute step_wait