mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
Remove auto postinstall workaround as beta6 is out
This commit is contained in:
parent
7e418dd2aa
commit
f9bb86956e
2 changed files with 0 additions and 68 deletions
|
@ -129,8 +129,6 @@ adminemail=$(ynh_user_get_info $admin mail)
|
|||
sed -i "s%YNH_ADMIN_EMAIL%$adminemail%g" ../sources/configuration.yml
|
||||
sed -i "s@YNH_FORUM_TITLE@$title@g" ../sources/configuration.yml
|
||||
sudo cp ../sources/configuration.yml $final_path
|
||||
# Workaround, waiting for beta6
|
||||
sudo \cp ../sources/Server.php $final_path/vendor/flarum/core/src/Console/Server.php
|
||||
sudo su - www-data -s /bin/bash -c "cd $final_path && php -d memory_limit=-1 flarum install -f configuration.yml"
|
||||
sudo rm $final_path/configuration.yml
|
||||
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Console;
|
||||
|
||||
use Flarum\Console\Command\GenerateMigrationCommand;
|
||||
use Flarum\Debug\Console\CacheClearCommand;
|
||||
use Flarum\Debug\Console\InfoCommand;
|
||||
use Flarum\Foundation\AbstractServer;
|
||||
use Flarum\Install\Console\InstallCommand;
|
||||
use Flarum\Update\Console\MigrateCommand;
|
||||
use Symfony\Component\Console\Application;
|
||||
|
||||
class Server extends AbstractServer
|
||||
{
|
||||
public function listen()
|
||||
{
|
||||
$console = $this->getConsoleApplication();
|
||||
|
||||
exit($console->run());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Application
|
||||
*/
|
||||
protected function getConsoleApplication()
|
||||
|
||||
|
||||
{
|
||||
|
||||
$app = $this->getApp();
|
||||
$console = new Application('Flarum', $app->version());
|
||||
|
||||
$app->register('Flarum\Install\InstallServiceProvider');
|
||||
|
||||
$commands = [
|
||||
InstallCommand::class,
|
||||
MigrateCommand::class,
|
||||
GenerateMigrationCommand::class,
|
||||
];
|
||||
|
||||
if ($app->isInstalled()) {
|
||||
$commands = array_merge($commands, [
|
||||
InfoCommand::class,
|
||||
CacheClearCommand::class
|
||||
]);
|
||||
}
|
||||
|
||||
foreach ($commands as $command) {
|
||||
$console->add($app->make(
|
||||
$command,
|
||||
['config' => $app->isInstalled() ? $app->make('flarum.config') : []]
|
||||
));
|
||||
}
|
||||
|
||||
return $console;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue