コード例 #1
0
ファイル: exec.klms.php プロジェクト: BillTheBest/1.6.x
function build_restart()
{
    $unix = new unix();
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pid = @file_get_contents("{$pidfile}");
    if ($unix->process_exists($pid, basename(__FILE__))) {
        system_admin_events("Already executed PID {$pid}", __FUNCTION__, __FILE__, __LINE__, "klms");
        die;
    }
    @file_put_contents($pidfile, getmypid());
    buildConf();
    InfoToSyslog();
    watchdog();
    shell_exec("/etc/init.d/klms restart");
}
コード例 #2
0
ファイル: klms.php プロジェクト: BillTheBest/1.6.x
function license_remove()
{
    $key_path = base64_decode($_GET["key-path"]);
    $cmd = "/opt/kaspersky/klms/bin/klms-control -l --revoke-active-key 2>&1";
    writelogs_framework($cmd, __FUNCTION__, __FILE__, __LINE__);
    exec($cmd, $results);
    echo "<articadatascgi>" . base64_encode(@implode("\n", $results)) . "</articadatascgi>";
    InfoToSyslog();
}