Browse Source

Added an option to configure the hostname manually. And there was a problem when APC wasn't present.

pull/758/head
Michael Vogel 8 years ago
parent
commit
e746c4955b
  1. 5
      include/cli_startup.php
  2. 5
      include/config.php
  3. 3
      include/cronhooks.php
  4. 3
      include/delivery.php
  5. 2
      include/expire.php
  6. 3
      include/gprobe.php
  7. 3
      include/notifier.php
  8. 3
      include/onepoll.php
  9. 3
      include/poller.php
  10. 3
      include/queue.php
  11. 3
      index.php

5
include/cli_startup.php

@ -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();
}
}

5
include/config.php

@ -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);

3
include/cronhooks.php

@ -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');

3
include/delivery.php

@ -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)

2
include/expire.php

@ -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'));

3
include/gprobe.php

@ -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();

3
include/notifier.php

@ -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)

3
include/onepoll.php

@ -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();

3
include/poller.php

@ -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;

3
include/queue.php

@ -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();

3
index.php

@ -53,6 +53,9 @@ if(!$install) {
load_config('config');
load_config('system');
if ($hostname = get_config('system', 'hostname'))
$a->set_hostname($hostname);
require_once("include/session.php");
load_hooks();
call_hooks('init_1');

Loading…
Cancel
Save