friendica-github/bin/jetstream.php

31 lines
838 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-02 13:03:28 +01:00
* @deprecated 2025.01 use bin/console.php jetstream instead
*/
use Dice\Dice;
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';
2024-12-28 22:44:23 +00:00
$dice = (new Dice())->addRules(require(dirname(__DIR__) . '/static/dependencies.config.php'));
2025-01-01 23:52:48 +01:00
$argv = $_SERVER['argv'] ?? [];
array_splice($argv, 1, 0, "jetstream");
2025-01-05 22:02:38 +01:00
$container = \Friendica\Core\Container::fromDice($dice);
\Friendica\Core\Console::create($container, $_SERVER['argv'] ?? [])->execute();