Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
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.

31 lines
726 B

  1. <?php
  2. require_once("boot.php");
  3. $a = new App;
  4. @include(".htconfig.php");
  5. $lang = get_browser_language();
  6. load_translation_table($lang);
  7. require_once("include/dba.php");
  8. $db = new dba($db_host, $db_user, $db_pass, $db_data, false);
  9. unset($db_host, $db_user, $db_pass, $db_data);
  10. load_config('config');
  11. load_config('system');
  12. $maint_mode = 1;
  13. if($argc > 1)
  14. $maint_mode = intval($argv[1]);
  15. set_config('system', 'maintenance', $maint_mode);
  16. if($maint_mode)
  17. $mode_str = "maintenance mode";
  18. else
  19. $mode_str = "normal mode";
  20. echo "\n\tSystem set in $mode_str\n\n";
  21. echo "Usage:\n\n";
  22. echo "\tphp {$argv[0]} [1]\tSet the system in maintenance mode\n";
  23. echo "\tphp {$argv[0]} 0 \tSet the system in normal mode\n\n";