From 86a5e66358ea50b048345cdce324e020c64b1894 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sun, 8 Apr 2012 10:39:10 +0000 Subject: [PATCH] automatically change directory to observium base, hopefully avoids the need of a cd /opt/observium in crontab and on commandline git-svn-id: http://www.observium.org/svn/observer/trunk@2989 61d68cd4-352d-0410-923a-c4978735b2b8 --- discovery.php | 2 ++ poller.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/discovery.php b/discovery.php index 6013b0964..b2df11ab5 100755 --- a/discovery.php +++ b/discovery.php @@ -12,6 +12,8 @@ * See COPYING for more details. */ +chdir(dirname($argv[0])); + include("includes/defaults.inc.php"); include("config.php"); include("includes/functions.php"); diff --git a/poller.php b/poller.php index 3f3c33792..c81bc741b 100755 --- a/poller.php +++ b/poller.php @@ -12,6 +12,8 @@ * See COPYING for more details. */ +chdir(dirname($argv[0])); + include("includes/defaults.inc.php"); include("config.php"); include("includes/functions.php");