Esempio n. 1
0
    restart();
    die;
}
if ($argv[1] == "--vacuumdb") {
    $GLOBALS["OUTPUT"] = true;
    vacuumdb();
    die;
}
if ($argv[1] == "--php5-pgsql") {
    $GLOBALS["OUTPUT"] = true;
    php5_pgsql();
    die;
}
if ($argv[1] == "--remove-database") {
    $GLOBALS["OUTPUT"] = true;
    remove_database();
    die;
}
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Could not understand ?\n";
function php5_pgsql()
{
    $unix = new unix();
    $unix->DEBIAN_INSTALL_PACKAGE("php5-pgsql");
    system("/usr/share/artica-postfix/exec.php.ini.php");
    system("/etc/init.d/artica-webconsole restart");
}
function restart()
{
    $unix = new unix();
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pid = $unix->get_pid_from_file($pidfile);
Esempio n. 2
0
}
if ($argv[1] == "--stop-server") {
    zarafa_server2_stop();
    die;
}
if ($argv[1] == "--isrun") {
    zarafa_db_is_run();
    die;
}
if ($argv[1] == "--remove-database") {
    remove_database();
    exit;
}
if ($argv[1] == "--trash") {
    $GLOBALS["OUTPUT"] = true;
    remove_database(true);
    exit;
}
function zarafa_db_is_run()
{
    $PID = ZARAFADB_PID();
    $unix = new unix();
    if (!$unix->process_exists($PID)) {
        echo "Zarafa Database is not running\n";
        return;
    }
    echo "Zarafa Database is running\n";
}
function get_memory()
{
    $unix = new unix();