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 7 years ago
parent
commit
e746c4955b
11 changed files with 33 additions and 3 deletions
  1. +4
    -1
      include/cli_startup.php
  2. +3
    -2
      include/config.php
  3. +3
    -0
      include/cronhooks.php
  4. +3
    -0
      include/delivery.php
  5. +2
    -0
      include/expire.php
  6. +3
    -0
      include/gprobe.php
  7. +3
    -0
      include/notifier.php
  8. +3
    -0
      include/onepoll.php
  9. +3
    -0
      include/poller.php
  10. +3
    -0
      include/queue.php
  11. +3
    -0
      index.php

+ 4
- 1
include/cli_startup.php View File

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

+ 3
- 2
include/config.php View File

@ -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
- 0
include/cronhooks.php View File

@ -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
- 0
include/delivery.php View File

@ -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
- 0
include/expire.php View File

@ -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
- 0
include/gprobe.php View File

@ -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
- 0
include/notifier.php View File

@ -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
- 0
include/onepoll.php View File

@ -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
- 0
include/poller.php View File

@ -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
- 0
include/queue.php View File

@ -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
- 0
index.php View File

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