Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorvipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-11-05 16:17:52 +0300
committervipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-11-05 16:17:52 +0300
commit24f61945663c6a39ef5faf7adad73be4c3e50839 (patch)
treeea400346d744790468eda1fd8704a530d33ad3dc /misc
parentb6ae223ae3404b5d42bc18d9cb73e1f292cbcb4a (diff)
fixes #1033 - archive.sh patch; thanks ogs22
Diffstat (limited to 'misc')
-rw-r--r--misc/cron/archive.sh11
1 files changed, 10 insertions, 1 deletions
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