当前位置: 首页>>代码示例>>PHP>>正文


PHP unix::PIDOF方法代码示例

本文整理汇总了PHP中unix::PIDOF方法的典型用法代码示例。如果您正苦于以下问题:PHP unix::PIDOF方法的具体用法?PHP unix::PIDOF怎么用?PHP unix::PIDOF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unix的用法示例。


在下文中一共展示了unix::PIDOF方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: XZARAFA_GATEWAY_PID

function XZARAFA_GATEWAY_PID()
{
    $unix = new unix();
    $pid = $unix->get_pid_from_file("/var/run/zarafa-gateway.pid");
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    return $unix->PIDOF($unix->find_program("zarafa-gateway"));
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:exec.zarafa-gateway.php

示例2: PID_NUM

function PID_NUM()
{
    $filename = PID_PATH();
    $pid = trim(@file_get_contents($filename));
    $unix = new unix();
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    return $unix->PIDOF($unix->find_program("memcached"));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:10,代码来源:exec.memcached.php

示例3: SQUID_PID

function SQUID_PID()
{
    $unix = new unix();
    $squidbin = $unix->LOCATE_SQUID_BIN();
    $pid = $unix->get_pid_from_file($unix->LOCATE_SQUID_PID());
    if (!$unix->process_exists($pid)) {
        $pid = $unix->PIDOF($squidbin);
    }
    return $pid;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:exec.squid.reconfigure.php

示例4: GET_PID

function GET_PID()
{
    $unix = new unix();
    $pid = $unix->get_pid_from_file("/var/run/rsyslogd.pid");
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    $rsyslogd = $unix->find_program("rsyslogd");
    return $unix->PIDOF($rsyslogd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:exec.watchdog.rsyslogd.php

示例5: GETPID

function GETPID()
{
    $unix = new unix();
    if (is_file('/etc/artica-postfix/exec.hotspot-tail.php.pid')) {
        $pid = @file_get_contents("'/etc/artica-postfix/exec.hotspot-tail.php.pid'");
    }
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    $pid = $unix->PIDOF("/bin/hotspot-tail");
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    return $unix->PIDOF_PATTERN("exec.hotspot-tail.php");
}
开发者ID:articatech,项目名称:artica,代码行数:15,代码来源:exec.init-tail-hotspot.php

示例6: PID_NUM

function PID_NUM()
{
    $filename = PID_PATH();
    $pid = trim(@file_get_contents($filename));
    $unix = new unix();
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    return $unix->PIDOF($unix->LOCATE_STUNNEL());
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:exec.stunnel.php

示例7: PID_NUM

function PID_NUM()
{
    $unix = new unix();
    $Masterbin = $unix->find_program("conntrackd");
    if (!is_file($Masterbin)) {
        return 0;
    }
    return $unix->PIDOF($Masterbin);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:exec.conntrackd.php

示例8: SingleInstance_pid

function SingleInstance_pid()
{
    $unix = new unix();
    $pidpath = "/var/run/milter-greylist/milter-greylist.pid";
    $pid = $unix->get_pid_from_file($pidpath);
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    return $unix->PIDOF($unix->find_program("milter-greylist"));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:10,代码来源:exec.milter-greylist.php

示例9: zipproxy_pid

function zipproxy_pid()
{
    $unix = new unix();
    $masterbin = $unix->find_program("ziproxy");
    $pid = $unix->get_pid_from_file('/var/run/squid/ziproxy.pid');
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    return $unix->PIDOF($masterbin);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:exec.zipproxy.php

示例10: Kav4ProxyUpdate

function Kav4ProxyUpdate()
{
    $unix = new unix();
    $cmd = "/opt/kaspersky/kav4proxy/bin/kav4proxy-keepup2date";
    $type = $_GET["type"];
    if ($type == "milter") {
        if (is_file("/opt/kav/5.6/kavmilter/bin/keepup2date")) {
            $cmd = "/opt/kav/5.6/kavmilter/bin/keepup2date";
        }
        if (is_file("/opt/kaspersky/kav4lms/bin/kav4lms-keepup2date")) {
            shell_exec("/usr/share/artica-postfix/bin/artica-install --kavm4mls-info");
            $cmd = "/opt/kaspersky/kav4lms/bin/kav4lms-keepup2date";
        }
    }
    if ($type == "kas") {
        $cmd = "/usr/local/ap-mailfilter3/bin/keepup2date -c /usr/local/ap-mailfilter3/etc/keepup2date.conf";
    }
    $pid = $unix->PIDOF(basename($cmd));
    if (strlen($pid) > 0) {
        return;
    }
    @file_put_contents("/usr/share/artica-postfix/ressources/logs/Kav4ProxyUpdate", "{waiting}...\nSelected {$type}: " . basename($cmd) . "\n\n");
    @chmod("/usr/share/artica-postfix/ressources/logs/Kav4ProxyUpdate", 0775);
    sys_THREAD_COMMAND_SET("{$cmd} >>/usr/share/artica-postfix/ressources/logs/Kav4ProxyUpdate");
}
开发者ID:brucewu16899,项目名称:artica,代码行数:25,代码来源:cmd.php

示例11: PID_NUM

function PID_NUM()
{
    $unix = new unix();
    $pid = $unix->get_pid_from_file("/var/run/clamav/clamd.pid");
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    $Masterbin = $unix->find_program("clamd");
    return $unix->PIDOF($Masterbin);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:10,代码来源:exec.clamd.php

示例12: PID_NUM

function PID_NUM()
{
    $unix = new unix();
    $pid = $unix->get_pid_from_file("/home/ArticaStatsDB/postmaster.pid");
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    return $unix->PIDOF("/usr/local/ArticaStats/bin/postgres");
}
开发者ID:articatech,项目名称:artica,代码行数:9,代码来源:exec.postgres.php

示例13: ParseRetranslatorLogs

function ParseRetranslatorLogs()
{
    $unix = new unix();
    if ($unix->PIDOF("/usr/share/artica-postfix/bin/retranslator.bin") > 0) {
        return;
    }
    $dir = "/var/log/kretranslator";
    if (!is_dir($dir)) {
        return null;
    }
    $unix = new unix();
    $files = $unix->DirFiles($dir);
    while (list($num, $file) = each($files)) {
        if (!preg_match("#retranslator-([0-9\\-]+)_([0-9]+)-([0-9]+)-([0-9]+).debug#", $file, $re)) {
            continue;
        }
        $date = "{$re[1]} {$re[2]}:{$re[3]}:{$re[4]}";
        $NumberofFilesUpdated = NumberofRestransFilesUpdated("{$dir}/{$file}");
        if ($NumberofFilesUpdated[0] > 0) {
            $subject = "Kaspersky Retranslator: {$NumberofFilesUpdated[0]} files updated ({$NumberofFilesUpdated[1]})";
            send_email_events($subject, @file_get_contents("{$dir}/{$file}"), "KASPERSKY_UPDATES", $date);
            @unlink("{$dir}/{$file}");
            continue;
        }
        @unlink("{$dir}/{$file}");
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:27,代码来源:exec.kaspersky-update-logs.php

示例14: DEFAULT_PID

function DEFAULT_PID()
{
    $unix = new unix();
    $pid = $unix->get_pid_from_file('/var/run/fetchmail.pid');
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    $fetchmail = $unix->find_program("fetchmail");
    return $unix->PIDOF($fetchmail);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:exec.fetchmail.php

示例15: ntopng_pid

function ntopng_pid()
{
    $unix = new unix();
    $masterbin = $unix->find_program("ntopng");
    $pid = $unix->get_pid_from_file('/var/run/ntopng/ntopng.pid');
    if ($unix->process_exists($pid)) {
        return $pid;
    }
    return $unix->PIDOF($masterbin);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:10,代码来源:exec.ntopng.php


注:本文中的unix::PIDOF方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。