예제 #1
0
파일: driver.py 프로젝트: quaddra/engage
 def run(self):
     if not self.ctx.rv(macports_pkg.is_installed, PORTS_PACKAGE_NAME):
         htprocs = processutils.find_matching_processes(["httpd"])
         if len(htprocs) > 0:
             raise UserError(errors[ERR_HTTPD_ALREADY_RUNNING],
                             developer_msg="\n".join(["%d %s" for (pid, cmd)
                                                      in htprocs]))
예제 #2
0
def _macports_apache_is_running(controller_exe, sudo_password):
    matches = iuprocess.find_matching_processes(['/opt/local/apache2/bin/httpd',])
    if len(matches)>0:
        logger.debug("Apache status is up (found %d httpd processes)" % len(matches))
        return True
    else:
        logger.debug("Apache status is down")
        return False
예제 #3
0
파일: driver.py 프로젝트: quaddra/engage
 def dry_run(self):
     if not self.ctx.rv(macports_pkg.is_installed, PORTS_PACKAGE_NAME):
         htprocs = processutils.find_matching_processes(["httpd"])
         if len(htprocs) > 0:
             logger.warning("Found an existing httpd process. Do you have your Mac's built-in webserver running? Check the 'personal web sharing' preference in your System Preferences.")