1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/misc/cron/archive.sh
Stefan Giehl 75290a04f4 Use https URLs (#23072)
* Use https URLs

* Build vue files

* use matomo.org instead of piwik.org in some links

* updates expected UI test file

---------

Co-authored-by: innocraft-automation <innocraft-automation@users.noreply.github.com>
2025-02-27 16:34:08 +01:00

44 خطوط
1.2 KiB
Bash

#!/bin/sh -e
# =======================================================================
# WARNING: this script archive.sh is DEPRECATED!
#
# => Replace your cron with `/usr/bin/php /path/to/piwik/console core:archive --url=https://example.org/piwik/`
#
# See documentation at https://piwik.org/setup-auto-archiving/
# =======================================================================
for TEST_PHP_BIN in php5 php php-cli php-cgi; do
if which $TEST_PHP_BIN >/dev/null 2>/dev/null; then
PHP_BIN=`which $TEST_PHP_BIN`
break
fi
done
if test -z $PHP_BIN; then
echo "php binary not found. Make sure php5 or php exists in PATH." >&2
exit 1
fi
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"/../../console
CONSOLE_CMD="$PHP_BIN -q $PIWIK_PATH core:archive --url=https://example.org"
MESSAGE="\n\n WARNING: this script archive.sh is DEPRECATED! \n\nPlease update your cron as explained in the documentation: https://matomo.org/docs/setup-auto-archiving/ \n\n"
echo $MESSAGE;
$CONSOLE_CMD
echo $MESSAGE;
exit 1