def stopnodeservice(self, node, s):
        ''' Stop a service on a node.
        '''
        status = ""
        if len(s._shutdown) == 0:
            # doesn't have a shutdown command
            status += "0"
        else:
            for cmd in s._shutdown:
                try:
                    tmp = node.cmd(shlex.split(cmd),  wait = True)
                    status += "%s" % (tmp)
                except:
                    node.warn("error running stop command %s" % cmd)
                    status += "-1"
        return status
dataset/ETHPy150Open coreemu/core/daemon/core/service.py/CoreServices.stopnodeservice/original