]> git.mxchange.org Git - friendica.git/blob - include/cli_startup.php
7b15fbfb30857520a64700d8f3882d416ed5edc7
[friendica.git] / include / cli_startup.php
1 <?php /** @file */
2
3 require_once('boot.php');
4
5 // Everything we need to boot standalone 'background' processes
6
7 function cli_startup() {
8
9         global $a, $db;
10
11         if(is_null($a)) {
12                 $a = new App;
13         }
14
15         if(is_null($db)) {
16             @include(".htconfig.php");
17         require_once("dba.php");
18             $db = new dba($db_host, $db_user, $db_pass, $db_data);
19         unset($db_host, $db_user, $db_pass, $db_data);
20         };
21
22         $a->start_process();
23
24         require_once('include/session.php');
25
26         load_config('config');
27         load_config('system');
28
29         $a->set_baseurl(get_config('system','url'));
30
31         load_hooks();
32
33 }