raspap-webgui-mirror/raspap.php

20 lines
508 B
PHP
Raw Normal View History

2016-05-29 15:38:43 +00:00
<?php
2021-02-02 10:03:09 +00:00
function getConfig()
{
$config = array(
'admin_user' => 'admin',
'admin_pass' => '$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i'
);
2016-05-29 15:38:43 +00:00
2021-02-02 10:03:09 +00:00
if (file_exists(RASPI_CONFIG . '/raspap.auth')) {
if ($auth_details = fopen(RASPI_CONFIG . '/raspap.auth', 'r')) {
$config['admin_user'] = trim(fgets($auth_details));
$config['admin_pass'] = trim(fgets($auth_details));
fclose($auth_details);
}
}
2021-02-02 10:03:09 +00:00
return $config;
2016-05-29 15:38:43 +00:00
}
2021-02-02 10:03:09 +00:00