Beispiel #1
0
 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]))
Beispiel #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
Beispiel #3
0
 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.")