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