Пример #1
0
if (posix_getuid() != 0) {
    die("Cannot be used in web server mode\n\n");
}
include_once dirname(__FILE__) . '/ressources/class.templates.inc';
include_once dirname(__FILE__) . '/ressources/class.ini.inc';
include_once dirname(__FILE__) . '/ressources/class.mysql.inc';
include_once dirname(__FILE__) . '/framework/class.unix.inc';
include_once dirname(__FILE__) . '/framework/frame.class.inc';
include_once dirname(__FILE__) . '/ressources/class.system.network.inc';
include_once dirname(__FILE__) . '/ressources/class.postfix-multi.inc';
include_once dirname(__FILE__) . '/ressources/class.main_cf.inc';
include_once dirname(__FILE__) . '/ressources/class.assp-multi.inc';
if ($argv[1] == '--org') {
    CheckInstall($argv[2]);
    $ass = new assp_multi($argv[2]);
    $ass->WriteConf();
    echo "Starting......: " . date("H:i:s") . " ASSP writing configuration done\n";
    if (!$ass->running) {
        $instance = str_replace(" ", "-", $ass->ou);
        @chdir("/usr/share/assp-{$instance}");
        @chmod("/usr/share/assp-{$instance}/assp.pl", 0777);
        @shell_exec("/usr/share/assp-{$instance}/assp.pl &");
    }
}
function CheckInstall($ou)
{
    $instance = str_replace(" ", "-", $ou);
    $root = "/usr/share/assp-{$instance}";
    @mkdir("{$root}", 0755, true);
    $dirs[] = "certs";
Пример #2
0
function EnableASSP()
{
    $assp = new assp_multi($_GET["ou"]);
    $assp->SET_VALUE("ASSPEnabled", $_GET["EnableASSP"]);
}