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,8 +24,11 @@ function cli_startup() {
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
load_hooks();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,8 @@ function get_config($family, $key, $instore = false) {
|
|||
return false;
|
||||
else
|
||||
return $val;
|
||||
} else
|
||||
}
|
||||
// else
|
||||
//logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
|
||||
|
||||
|
||||
|
@ -207,7 +208,7 @@ function get_pconfig($uid,$family, $key, $instore = false) {
|
|||
return false;
|
||||
else
|
||||
return $val;
|
||||
} else
|
||||
} // else
|
||||
//logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
|
||||
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@ function cronhooks_run(&$argv, &$argc){
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
$lockpath = get_config('system','lockpath');
|
||||
if ($lockpath != '') {
|
||||
$pidfile = new pidfile($lockpath, 'cron.lck');
|
||||
|
|
|
@ -27,6 +27,9 @@ function delivery_run(&$argv, &$argc){
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
load_hooks();
|
||||
|
||||
if($argc < 3)
|
||||
|
|
|
@ -25,6 +25,8 @@ function expire_run(&$argv, &$argc){
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@ function gprobe_run(&$argv, &$argc){
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
load_hooks();
|
||||
|
|
|
@ -65,6 +65,9 @@ function notifier_run(&$argv, &$argc){
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
load_hooks();
|
||||
|
||||
if($argc < 3)
|
||||
|
|
|
@ -37,6 +37,9 @@ function onepoll_run(&$argv, &$argc){
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
load_hooks();
|
||||
|
|
|
@ -30,6 +30,9 @@ function poller_run(&$argv, &$argc){
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
$maxsysload = intval(get_config('system','maxloadavg'));
|
||||
if($maxsysload < 1)
|
||||
$maxsysload = 50;
|
||||
|
|
|
@ -25,6 +25,9 @@ function queue_run(&$argv, &$argc){
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ($hostname = get_config('system', 'hostname'))
|
||||
$a->set_hostname($hostname);
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
load_hooks();
|
||||
|
|
Loading…
Reference in New Issue
Block a user