1#!/usr/bin/env php 2<?php 3 4$scriptPath = $_SERVER['SCRIPT_FILENAME']; 5 6if(strstr($scriptPath, '/home/govhosts')) { 7 8 $parts = explode('/', $scriptPath); 9 $hostname = $parts[3]; 10 11 $config = '/etc/groupoffice/'.$hostname.'/config.php'; 12 13 if(!file_exists($config)) { 14 exit("Could not find servermanager config file"); 15 } 16 17 define("GO_CONFIG_FILE", $config); 18 19 echo "Using config file: $config\n"; 20} 21 22define('ZPUSH_CONFIG', __DIR__ . '/config.php'); 23 24require_once 'vendor/z-push/vendor/autoload.php'; 25require_once ("backend/go/autoload.php"); 26require_once 'vendor/z-push/z-push-top.php'; 27