From 624876cf46b75ab7078c31d81b4cd339b499e562 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Wed, 9 Dec 2015 14:49:11 +0100 Subject: [PATCH 1/1] Prevent from running guardian twice. Guardian now checks for an already running instance on startup and will cancel if there has been found one. Signed-off-by: Stefan Schantl --- guardian | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guardian b/guardian index 58a0819..2a5b460 100644 --- a/guardian +++ b/guardian @@ -66,6 +66,11 @@ if (defined($cmdargs{"help"})) { exit; } +# Check if another instance of guardian is allready running. +if (&Guardian::Daemon::IsRunning()) { + die "Another instance of Guardian is allready running...\n"; +} + # Read-in the configuration file and store the settings. # Push the may be given config file argument. my %mainsettings = &Guardian::Config::UseConfig($cmdargs{"config"}); -- 2.39.2