mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-05-24 00:24:07 +03:00
Initial import and public 'release'
This commit is contained in:
parent
327597ca02
commit
90ee4dfea0
792 changed files with 147584 additions and 0 deletions
47
htdocs/includes/config.inc.php
Normal file
47
htdocs/includes/config.inc.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
$apiuser = ''; # The PowerDNS API username
|
||||
$apipass = ''; # The PowerDNS API-user password
|
||||
$apiip = ''; # The IP of the PowerDNS API
|
||||
$apiport = '8081'; # The port of the PowerDNS API
|
||||
$apisid = ''; # PowerDNS's :server_id
|
||||
|
||||
$authdb = "../etc/pdns.users.sqlite3";
|
||||
|
||||
$templates = array();
|
||||
/*
|
||||
$templates[] = array(
|
||||
'name' => 'Tuxis',
|
||||
'owner' => 'username', # Set to 'public' to make it available to all users
|
||||
'records' => array(
|
||||
array(
|
||||
'label' => '',
|
||||
'type' => 'MX',
|
||||
'content' => 'mx2.tuxis.nl',
|
||||
'priority' => '200')
|
||||
)
|
||||
);
|
||||
*/
|
||||
|
||||
$defaults['defaulttype'] = 'Master'; # Choose between 'Native' or 'Master'
|
||||
$defaults['primaryns'] = 'unconfigured.primaryns'; # The value of the first NS-record
|
||||
$defaults['secondaryns'] = 'unconfigured.secondaryns'; # The value of the second NS-record
|
||||
$defaults['ttl'] = 3600; # Default TTL for records
|
||||
$defaults['priority'] = 0; # Default for priority in records
|
||||
|
||||
|
||||
|
||||
|
||||
/* No need to change stuf below */
|
||||
$defaults['defaulttype'] = ucfirst(strtolower($defaults['defaulttype']));
|
||||
|
||||
if (!file_exists($authdb)) {
|
||||
is_dir(dirname($authdb)) || mkdir(dirname($authdb));
|
||||
$db = new SQLite3($authdb, SQLITE3_OPEN_CREATE|SQLITE3_OPEN_READWRITE);
|
||||
$createsql = file_get_contents('scheme.sql');
|
||||
$db->exec($createsql);
|
||||
$salt = bin2hex(openssl_random_pseudo_bytes(16));
|
||||
$db->exec("INSERT INTO users (emailaddress, password, isadmin) VALUES ('admin', '".crypt("admin", '$6$'.$salt)."', 1)");
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue