From 24f61945663c6a39ef5faf7adad73be4c3e50839 Mon Sep 17 00:00:00 2001 From: vipsoft Date: Thu, 5 Nov 2009 13:17:52 +0000 Subject: fixes #1033 - archive.sh patch; thanks ogs22 --- misc/cron/archive.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'misc') diff --git a/misc/cron/archive.sh b/misc/cron/archive.sh index 74c2935a6d..704068864d 100644 --- a/misc/cron/archive.sh +++ b/misc/cron/archive.sh @@ -23,7 +23,16 @@ PHP_BIN=`which php5 2>/dev/null` if test -z $PHP_BIN; then PHP_BIN=`which php` fi -PIWIK_CRON_FOLDER=`dirname $(readlink -f ${0})` + +act_path() { + local pathname="$1" + readlink -f "$pathname" 2>/dev/null || \ + realpath "$pathname" 2>/dev/null || \ + type -P "$pathname" 2>/dev/null +} + +ARCHIVE=`act_path ${0}` +PIWIK_CRON_FOLDER=`dirname ${ARCHIVE}` PIWIK_PATH="$PIWIK_CRON_FOLDER"/../../index.php PIWIK_CONFIG="$PIWIK_CRON_FOLDER"/../../config/config.ini.php -- cgit v1.2.3