Added a simple check to stop Auto from being ran multiple times

This commit is contained in:
Matthew Barksdale committed 2011-01-21 17:53:41 -05:00
1 parent 137e502906
commit fb4a0b1db2
1 file changed
+4
+4
View File
@@ -6,12 +6,16 @@ MODS="Mouse Async Class::Unload"
EMODS="MIME::Base64" EMODS="MIME::Base64"
if [ "$1" = "start" ] ; then if [ "$1" = "start" ] ; then
if [ -e $PID ]; then
echo "Auto appears to be running already."
else
echo "Starting Auto. . ." echo "Starting Auto. . ."
bin/auto bin/auto
sleep 2 sleep 2
if [ ! -r $PID ]; then if [ ! -r $PID ]; then
echo "Possible failed startup... check Auto logs for more information" echo "Possible failed startup... check Auto logs for more information"
fi fi
fi
elif [ "$1" = "stop" ]; then elif [ "$1" = "stop" ]; then
echo "Stopping Auto. . ." echo "Stopping Auto. . ."