Added an option to configure the hostname manually. And there was a problem when APC wasn't present.
This commit is contained in:
parent
d92a348cf0
commit
e746c4955b
|
@ -24,6 +24,9 @@ function cli_startup() {
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
|
@ -77,7 +77,8 @@ function get_config($family, $key, $instore = false) {
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return $val;
|
return $val;
|
||||||
} else
|
}
|
||||||
|
// else
|
||||||
//logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
|
//logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
|
||||||
|
|
||||||
|
|
||||||
|
@ -207,7 +208,7 @@ function get_pconfig($uid,$family, $key, $instore = false) {
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return $val;
|
return $val;
|
||||||
} else
|
} // else
|
||||||
//logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
|
//logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@ function cronhooks_run(&$argv, &$argc){
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
$lockpath = get_config('system','lockpath');
|
$lockpath = get_config('system','lockpath');
|
||||||
if ($lockpath != '') {
|
if ($lockpath != '') {
|
||||||
$pidfile = new pidfile($lockpath, 'cron.lck');
|
$pidfile = new pidfile($lockpath, 'cron.lck');
|
||||||
|
|
|
@ -27,6 +27,9 @@ function delivery_run(&$argv, &$argc){
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
||||||
if($argc < 3)
|
if($argc < 3)
|
||||||
|
|
|
@ -25,6 +25,8 @@ function expire_run(&$argv, &$argc){
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@ function gprobe_run(&$argv, &$argc){
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
|
@ -65,6 +65,9 @@ function notifier_run(&$argv, &$argc){
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
||||||
if($argc < 3)
|
if($argc < 3)
|
||||||
|
|
|
@ -37,6 +37,9 @@ function onepoll_run(&$argv, &$argc){
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
|
@ -30,6 +30,9 @@ function poller_run(&$argv, &$argc){
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
$maxsysload = intval(get_config('system','maxloadavg'));
|
$maxsysload = intval(get_config('system','maxloadavg'));
|
||||||
if($maxsysload < 1)
|
if($maxsysload < 1)
|
||||||
$maxsysload = 50;
|
$maxsysload = 50;
|
||||||
|
|
|
@ -25,6 +25,9 @@ function queue_run(&$argv, &$argc){
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
$a->set_baseurl(get_config('system','url'));
|
$a->set_baseurl(get_config('system','url'));
|
||||||
|
|
||||||
load_hooks();
|
load_hooks();
|
||||||
|
|
|
@ -53,6 +53,9 @@ if(!$install) {
|
||||||
load_config('config');
|
load_config('config');
|
||||||
load_config('system');
|
load_config('system');
|
||||||
|
|
||||||
|
if ($hostname = get_config('system', 'hostname'))
|
||||||
|
$a->set_hostname($hostname);
|
||||||
|
|
||||||
require_once("include/session.php");
|
require_once("include/session.php");
|
||||||
load_hooks();
|
load_hooks();
|
||||||
call_hooks('init_1');
|
call_hooks('init_1');
|
||||||
|
|
Loading…
Reference in a new issue