Ejemplo n.º 1
0
include_once(dirname(__FILE__).'/ressources/class.groups.inc');
include_once(dirname(__FILE__).'/ressources/class.mount.inc');
include_once(dirname(__FILE__).'/framework/class.unix.inc');
include_once(dirname(__FILE__)."/framework/frame.class.inc");

if(preg_match("#--verbose#",implode(" ",$argv))){$GLOBALS["VERBOSE"]=true;}
if(preg_match("#--force#",implode(" ",$argv))){$GLOBALS["FORCE"]=true;}

if($argv[1]=='--users'){CountDeUsers();die();}
if($argv[1]=='--fix-etc-hosts'){fixEtcHosts();die();}
if($argv[1]=='--sslbridge'){sslbridgre();die();}
if($argv[1]=='--ads-destroy'){ads_destroy();die();}
if($argv[1]=='--ads'){activedirectory();kinit();die();}
if($argv[1]=='--ping-ads'){activedirectory_ping();die();}
if($argv[1]=='--logon-scripts'){LogonScripts();die();}
if($argv[1]=='--administrator'){administrator_update();die();}
if($argv[1]=='--loglevel'){set_log_level($argv[2]);die();}
if($argv[1]=='--quotas-recheck'){quotasrecheck();die();}
if($argv[1]=='--quotas-recheck'){quotasrecheck();die();}
if($argv[1]=='--ldap-groups'){ldap_groups();die();}




if($argv[1]=='--help'){help_output();die();}

function help_output(){
	echo "--users...........: Save users number in cache\n";
	echo "--fix-etc-hosts...: Fix hostname in /etc/hosts\n";
	echo "--ads-destroy.....: Destroy Active directory connection\n";
	echo "--ads.............: Create Active directory connection\n";
Ejemplo n.º 2
0
}
if ($argv[1] == '--ads') {
    activedirectory();
    kinit();
    die;
}
if ($argv[1] == '--ping-ads') {
    activedirectory_ping();
    die;
}
if ($argv[1] == '--logon-scripts') {
    LogonScripts();
    die;
}
if ($argv[1] == '--administrator') {
    administrator_update();
    die;
}
if ($argv[1] == '--loglevel') {
    set_log_level($argv[2]);
    die;
}
if ($argv[1] == '--quotas-recheck') {
    quotasrecheck();
    die;
}
if ($argv[1] == '--quotas-recheck') {
    quotasrecheck();
    die;
}
if ($argv[1] == '--ldap-groups') {