Add ability to switch between new and existing daemon

This commit is contained in:
Dane Everitt 2017-09-30 19:23:44 -05:00
parent 281337943f
commit 15d38ce823
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 466 additions and 5 deletions

View file

@ -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);
}
}
}