friendica-github/bin/jetstream.php

30 lines
742 B
PHP
Raw Normal View History

#!/usr/bin/env php
<?php
/**
* Copyright (C) 2010-2024, the Friendica project
* SPDX-FileCopyrightText: 2010-2024 the Friendica project
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*
2025-01-06 18:45:33 +01:00
* @deprecated 2025.02 use bin/console.php jetstream instead
*/
if (php_sapi_name() !== 'cli') {
header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden');
exit();
}
// Ensure that Jetstream.php is executed from the base path of the installation
2024-12-28 22:39:20 +00:00
chdir(dirname(__DIR__));
require dirname(__DIR__) . '/vendor/autoload.php';
2025-01-01 23:52:48 +01:00
$argv = $_SERVER['argv'] ?? [];
array_splice($argv, 1, 0, "jetstream");
$container = \Friendica\Core\Container::fromBasePath(dirname(__DIR__));
2025-01-08 22:20:06 +00:00
$app = \Friendica\App::fromContainer($container);
$app->processConsole($argv);