From fb4a0b1db27c52f5d89f597001b29f11c8e9751f Mon Sep 17 00:00:00 2001 From: Matthew Barksdale Date: Fri, 21 Jan 2011 17:53:41 -0500 Subject: [PATCH] Added a simple check to stop Auto from being ran multiple times --- auto | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/auto b/auto index 20c29b4..0a57b0d 100755 --- a/auto +++ b/auto @@ -6,11 +6,15 @@ MODS="Mouse Async Class::Unload" EMODS="MIME::Base64" if [ "$1" = "start" ] ; then - echo "Starting Auto. . ." - bin/auto - sleep 2 - if [ ! -r $PID ]; then - echo "Possible failed startup... check Auto logs for more information" + if [ -e $PID ]; then + echo "Auto appears to be running already." + else + echo "Starting Auto. . ." + bin/auto + sleep 2 + if [ ! -r $PID ]; then + echo "Possible failed startup... check Auto logs for more information" + fi fi elif [ "$1" = "stop" ]; then