Index: /trunk/FACT++/src/dimctrl.cc
===================================================================
--- /trunk/FACT++/src/dimctrl.cc	(revision 13796)
+++ /trunk/FACT++/src/dimctrl.cc	(revision 13797)
@@ -116,5 +116,5 @@
 public:
     DimCtrl(ostream &out=cout) : MessageDimTX("DIM_CONTROL", out),
-        fLabel(-3), fStop(false), fVerbosity(0), fDebug(false), fIsServer(false),
+        fLabel(-3), fStop(-1), fVerbosity(0), fDebug(false), fIsServer(false),
         fSrvState("DIM_CONTROL/STATE", "C",
                   "Provides the state of the state machine as quality of service."
@@ -234,5 +234,13 @@
         fVerbosity = 40;
 
+        if (conf.Has("verbosity"))
+            fVerbosity = conf.Get<uint32_t>("verbosity");
+
+        if (conf.Get<bool>("quiet"))
+            fVerbosity = 90;
+
         fIsServer = conf.Get<bool>("server");
+        fDebug    = conf.Get<bool>("debug");
+
         if (fIsServer)
         {
@@ -240,24 +248,16 @@
             // an EXIT if another instance is already running
             DimServer::start("DIM_CONTROL");
-            sleep(1);
+            //sleep(1);
             fSrvState.setQuality(-3);
             fSrvState.Update("[boot]");
         }
 
-        if (conf.Has("verbosity"))
-            fVerbosity = conf.Get<uint32_t>("verbosity");
-
-        if (conf.Get<bool>("quiet"))
-            fVerbosity = 90;
-
-        fDebug = conf.Get<bool>("debug");
-
         return -1;
     }
 
-    void Stop(int stop=1) { fStop = stop; Readline::SetLabel(0); }
+    void Stop(int stop=0) { fStop = stop; Readline::SetLabel(0); }
     int Run(bool)
     {
-        while (!fStop)
+        while (fStop<0)
         {
             const string s = fScript;
@@ -271,5 +271,8 @@
             usleep(1000);
         }
-        return fStop-1; }
+
+        return fStop;
+    }
+
 };
 
