Add ability to switch between new and existing daemon
This commit is contained in:
parent
281337943f
commit
15d38ce823
8 changed files with 466 additions and 5 deletions
|
@ -94,10 +94,18 @@ class RepositoryServiceProvider extends ServiceProvider
|
|||
$this->app->bind(UserRepositoryInterface::class, UserRepository::class);
|
||||
|
||||
// Daemon Repositories
|
||||
$this->app->bind(ConfigurationRepositoryInterface::class, ConfigurationRepository::class);
|
||||
$this->app->bind(CommandRepositoryInterface::class, CommandRepository::class);
|
||||
$this->app->bind(DaemonServerRepositoryInterface::class, DaemonServerRepository::class);
|
||||
$this->app->bind(FileRepositoryInterface::class, FileRepository::class);
|
||||
$this->app->bind(PowerRepositoryInterface::class, PowerRepository::class);
|
||||
if ($this->app->make('config')->get('pterodactyl.daemon.use_new_daemon')) {
|
||||
$this->app->bind(ConfigurationRepositoryInterface::class, \Pterodactyl\Repositories\Wings\ConfigurationRepository::class);
|
||||
$this->app->bind(CommandRepositoryInterface::class, \Pterodactyl\Repositories\Wings\CommandRepository::class);
|
||||
$this->app->bind(DaemonServerRepositoryInterface::class, \Pterodactyl\Repositories\Wings\ServerRepository::class);
|
||||
$this->app->bind(FileRepositoryInterface::class, \Pterodactyl\Repositories\Wings\FileRepository::class);
|
||||
$this->app->bind(PowerRepositoryInterface::class, \Pterodactyl\Repositories\Wings\PowerRepository::class);
|
||||
} else {
|
||||
$this->app->bind(ConfigurationRepositoryInterface::class, ConfigurationRepository::class);
|
||||
$this->app->bind(CommandRepositoryInterface::class, CommandRepository::class);
|
||||
$this->app->bind(DaemonServerRepositoryInterface::class, DaemonServerRepository::class);
|
||||
$this->app->bind(FileRepositoryInterface::class, FileRepository::class);
|
||||
$this->app->bind(PowerRepositoryInterface::class, PowerRepository::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue