Example #1
0
function install_groupwares($apacheservername, $wwwservertype, $root, $hash)
{
    $dn = $hash["dn"];
    if (preg_match("#ou=www,ou=(.+?),dc=organizations#", $dn, $re)) {
        $hash["OU"][0] = trim($re[1]);
        $ouexec = trim($re[1]);
    }
    echo "Starting......: " . date("H:i:s") . " Apache groupware checking {$apacheservername} host ({$wwwservertype})\n";
    switch ($wwwservertype) {
        case "LMB":
            LMB_INSTALL($apacheservername, $root, $hash);
            break;
        case "JOOMLA":
            JOOMLA_INSTALL($apacheservername, $root, $hash);
            break;
        case "ROUNDCUBE":
            ROUNDCUBE_INSTALL($apacheservername, $root, $hash);
            break;
        case "SUGAR":
            SUGAR_INSTALL($apacheservername, $root, $hash);
            break;
        case "ARTICA_USR":
            ARTICA_INSTALL($apacheservername, $root, $hash);
            break;
        case "OBM2":
            OBM2_INSTALL($apacheservername, $root, $hash);
            break;
        case "OPENGOO":
            OPENGOO_INSTALL($apacheservername, $root, $hash);
            break;
        case "GROUPOFFICE":
            GROUPOFFICE_INSTALL($apacheservername, $root, $hash);
            break;
        case "ZARAFA":
            ZARAFA_INSTALL($apacheservername, $root, $hash);
            break;
        case "ZARAFA_MOBILE":
            ZARAFA_MOBILE_INSTALL($apacheservername, $root, $hash);
            break;
        case "DRUPAL":
            DRUPAL_INSTALL($apacheservername, $root, $hash);
            break;
        case "WEBDAV":
            WEBDAV_USERS($apacheservername, $root, $hash);
            break;
        case "PIWIGO":
            PIWIGO_INSTALL($apacheservername, $root, $hash);
            break;
        case "SQUID_STATS":
            SQUID_STATS_INSTALL($apacheservername, $root, $hash);
            break;
    }
}
Example #2
0
        OPENGOO_INSTALL($apacheservername, $root, $hash[$i]);
    }
    if ($wwwservertype == "GROUPOFFICE") {
        GROUPOFFICE_INSTALL($apacheservername, $root, $hash[$i]);
    }
    if ($wwwservertype == "ZARAFA") {
        ZARAFA_INSTALL($apacheservername, $root, $hash[$i]);
    }
    if ($wwwservertype == "ZARAFA_MOBILE") {
        ZARAFA_MOBILE_INSTALL($apacheservername, $root, $hash[$i]);
    }
    if ($wwwservertype == "DRUPAL") {
        DRUPAL_INSTALL($apacheservername, $root, $hash[$i]);
    }
    if ($wwwservertype == "WEBDAV") {
        WEBDAV_USERS($apacheservername, $root, $hash[$i]);
    }
}
if ($hash["count"] > 0) {
    echo "restart apache\n";
    writelogs("restart apache...", basename(__FILE__), __FILE__, __LINE__);
    system('/etc/init.d/artica-postfix restart apache-groupware');
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?roundcube-sync=yes&ou={$ouexec}");
}
function remove($servername)
{
    $apache = new vhosts();
    $GLOBALS["ADDLOG"] = "/var/log/artica-postfix/{$servername}.log";
    $confs = $apache->SearchHosts($servername);
    events(__FUNCTION__ . ":: Check {$servername}");