CODEMUXCONF="/etc/codemux/codemux.conf"
def start(options, conf):
- logger.log("codemux plugin starting up...")
+ logger.log("codemux: plugin starting up...")
def GetSlivers(data, config, plc = None):
"""
if slicesinconf.has_key("root"): _writeconf = False
else: _writeconf = True
+ if 'slivers' not in data:
+ logger.log("codemux.GetSlivers: could not find the slivers keyin data (PLC connection down?) - IGNORED")
+ return
+
# Parse attributes and update dict of scripts
for sliver in data['slivers']:
for attribute in sliver['attributes']:
def restartService():
+ if not os.path.exists("/etc/init.d/codemux"): return
logger.log("codemux: Restarting codemux service")
if isRunning():
logger.log_call("/etc/init.d/codemux","condrestart")
def startService():
+ if not os.path.exists("/etc/init.d/codemux"): return
if not isRunning():
logger.log("codemux: Starting codemux service")
logger.log_call("/etc/init.d/codemux", "start")
+ logger.log_call("/sbin/chkconfig", "codemux", "on")
def stopService():
+ if not os.path.exists("/etc/init.d/codemux"): return
if isRunning():
logger.log("codemux: Stopping codemux service")
logger.log_call("/etc/init.d/codemux", "stop")
+ logger.log_call("/sbin/chkconfig", "codemux", "off")