You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
508 B

  1. <?php
  2. function getConfig()
  3. {
  4. $config = array(
  5. 'admin_user' => 'admin',
  6. 'admin_pass' => '$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i'
  7. );
  8. if (file_exists(RASPI_CONFIG . '/raspap.auth')) {
  9. if ($auth_details = fopen(RASPI_CONFIG . '/raspap.auth', 'r')) {
  10. $config['admin_user'] = trim(fgets($auth_details));
  11. $config['admin_pass'] = trim(fgets($auth_details));
  12. fclose($auth_details);
  13. }
  14. }
  15. return $config;
  16. }