27 if (php_sapi_name() !=
'cli') {
28 trigger_error(
'This script can only be run from the command line', E_USER_ERROR);
32 $SYSTEM_ROOT = ((isset($_SERVER[
'argv'][1])) ? $_SERVER[
'argv'][1] :
'');
33 if (empty($SYSTEM_ROOT) || !is_readable($SYSTEM_ROOT)) {
34 trigger_error(
'You need to specify a path to Matrix as the first parameter', E_USER_ERROR);
38 define(
'SQ_SYSTEM_ROOT', $SYSTEM_ROOT);
39 require_once SQ_SYSTEM_ROOT.
'/core/include/init.inc';
42 $apache_user = fileowner(SQ_SYSTEM_ROOT.
'/data/private/conf/main.inc');
43 $current_user = array_get_index($_ENV,
'USER',
'');
45 if ($apache_user != $current_user) {
50 $funnelback_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'funnelback_manager');
53 $valid = $funnelback_manager->checkInstalled();
56 echo
"Looks ok from here\n";
58 echo
"Funnelback has not been installed correctly\n";