Example #1
0
<?php

include_once "htmllib/lib/include.php";
initProgram('admin');
$list = parse_opt($argv);
checkIfVariablesSet($list, array('server', 'class'));
$server = $list['server'];
$class = $list['class'];
if (!isset($list['driver'])) {
    $driverapp = $gbl->getSyncClass(null, $server, $class);
    print "Driver for {$class} is {$driverapp}\n";
    exit;
}
$pgm = $list['driver'];
changeDriverFunc($server, $class, $pgm);
Example #2
0
 * 	 Drivers:
 * 	   - powerdns: PowerDNS driver DNS management
 *     - ?
 *     
 *   Example: setdriver.php --server=localhost --class=dns --driver=powerdns
 *   
 * - ?
 * 
 * @todo UNDOCUMENTED (needs more work)
 * 
 * @copyright 2012, (c) LxCenter.
 * @license   AGPLv3 http://www.gnu.org/licenses/agpl-3.0.en.html
 * @author    Anonymous <*****@*****.**>
 * @author    Ángel Guzmán Maeso <*****@*****.**>
 * @version   v1.0 20120302 build
 * @package   scripts
 */
include_once "htmllib/lib/include.php";
initProgram('admin');
$list = parse_opt($argv);
checkIfVariablesSet($list, array('server', 'class'));
$server = $list['server'];
$class = $list['class'];
if (!isset($list['driver'])) {
    $driverapp = $gbl->getSyncClass(null, $server, $class);
    echo 'Driver for class ' . $class . ' is ' . $driverapp . PHP_EOL;
    exit;
} else {
    $driver = $list['driver'];
    changeDriverFunc($server, $class, $driver);
}