|
@@ -152,11 +152,22 @@ class BoB:
|
|
|
Returns None if successful, otherwise an string describing the
|
|
|
problem.
|
|
|
"""
|
|
|
+ # try to connect to the c-channel daemon,
|
|
|
+ # to see if it is already running
|
|
|
+ c_channel_env = { "ISC_MSGQ_PORT": str(self.c_channel_port), }
|
|
|
+ if self.verbose:
|
|
|
+ sys.stdout.write("Checking for already running msgq\n")
|
|
|
+ # try to connect, and if we can't wait a short while
|
|
|
+ try:
|
|
|
+ self.cc_session = isc.cc.Session(self.c_channel_port)
|
|
|
+ return "msgq already running, cannot start"
|
|
|
+ except isc.cc.session.SessionError:
|
|
|
+ pass
|
|
|
+
|
|
|
# start the c-channel daemon
|
|
|
if self.verbose:
|
|
|
sys.stdout.write("Starting msgq using port %d\n" %
|
|
|
self.c_channel_port)
|
|
|
- c_channel_env = { "ISC_MSGQ_PORT": str(self.c_channel_port), }
|
|
|
try:
|
|
|
c_channel = ProcessInfo("msgq", "msgq", c_channel_env, True)
|
|
|
except Exception as e:
|