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.
 
 
 
 
 
 

34 lines
718 B

  1. <?php
  2. use \Friendica\Core\Config;
  3. require_once("boot.php");
  4. $a = new App;
  5. @include(".htconfig.php");
  6. $lang = get_browser_language();
  7. load_translation_table($lang);
  8. require_once("include/dba.php");
  9. $db = new dba($db_host, $db_user, $db_pass, $db_data, false);
  10. unset($db_host, $db_user, $db_pass, $db_data);
  11. Config::load();
  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";