This breaks literally the entire panel.
This commit is contained in:
parent
344c1a9885
commit
df87ea0867
88 changed files with 1205 additions and 992 deletions
|
@ -6,17 +6,17 @@
|
|||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Pterodactyl\Models\Nest;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Pterodactyl\Models\Service;
|
||||
use Pterodactyl\Models\ServiceOption;
|
||||
use Pterodactyl\Models\ServiceVariable;
|
||||
use Pterodactyl\Models\EggVariable;
|
||||
|
||||
class MinecraftServiceTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* The core service ID.
|
||||
*
|
||||
* @var \Pterodactyl\Models\Service
|
||||
* @var \Pterodactyl\Models\Nest
|
||||
*/
|
||||
protected $service;
|
||||
|
||||
|
@ -80,7 +80,7 @@ EOF;
|
|||
|
||||
private function addCoreService()
|
||||
{
|
||||
$this->service = Service::updateOrCreate([
|
||||
$this->service = Nest::updateOrCreate([
|
||||
'author' => config('pterodactyl.service.core'),
|
||||
'folder' => 'minecraft',
|
||||
], [
|
||||
|
@ -114,7 +114,7 @@ fi
|
|||
curl -o ${SERVER_JARFILE} https://s3.amazonaws.com/Minecraft.Download/versions/${DL_VERSION}/minecraft_server.${DL_VERSION}.jar
|
||||
EOF;
|
||||
|
||||
$this->option['vanilla'] = ServiceOption::updateOrCreate([
|
||||
$this->option['vanilla'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'vanilla',
|
||||
], [
|
||||
|
@ -148,7 +148,7 @@ if [ ! -z "${DL_PATH}" ]; then
|
|||
fi
|
||||
EOF;
|
||||
|
||||
$this->option['spigot'] = ServiceOption::updateOrCreate([
|
||||
$this->option['spigot'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'spigot',
|
||||
], [
|
||||
|
@ -178,7 +178,7 @@ cd /mnt/server
|
|||
curl -sSL "https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/${SPONGE_VERSION}/spongevanilla-${SPONGE_VERSION}.jar" -o ${SERVER_JARFILE}
|
||||
EOF;
|
||||
|
||||
$this->option['sponge'] = ServiceOption::updateOrCreate([
|
||||
$this->option['sponge'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'sponge',
|
||||
], [
|
||||
|
@ -211,7 +211,7 @@ fi
|
|||
curl -o ${SERVER_JARFILE} https://ci.md-5.net/job/BungeeCord/${BUNGEE_VERSION}/artifact/bootstrap/target/BungeeCord.jar
|
||||
EOF;
|
||||
|
||||
$this->option['bungeecord'] = ServiceOption::updateOrCreate([
|
||||
$this->option['bungeecord'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'bungeecord',
|
||||
], [
|
||||
|
@ -247,7 +247,7 @@ java -jar installer.jar --installServer
|
|||
rm -rf installer.jar
|
||||
EOF;
|
||||
|
||||
$this->option['forge'] = ServiceOption::updateOrCreate([
|
||||
$this->option['forge'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'forge',
|
||||
], [
|
||||
|
@ -276,7 +276,7 @@ EOF;
|
|||
|
||||
private function addVanillaVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['vanilla']->id,
|
||||
'env_variable' => 'SERVER_JARFILE',
|
||||
], [
|
||||
|
@ -288,7 +288,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^([\w\d._-]+)(\.jar)$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['vanilla']->id,
|
||||
'env_variable' => 'VANILLA_VERSION',
|
||||
], [
|
||||
|
@ -303,7 +303,7 @@ EOF;
|
|||
|
||||
private function addSpigotVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['spigot']->id,
|
||||
'env_variable' => 'SERVER_JARFILE',
|
||||
], [
|
||||
|
@ -315,7 +315,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^([\w\d._-]+)(\.jar)$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['spigot']->id,
|
||||
'env_variable' => 'DL_VERSION',
|
||||
], [
|
||||
|
@ -327,7 +327,7 @@ EOF;
|
|||
'rules' => 'required|string|between:3,7',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['spigot']->id,
|
||||
'env_variable' => 'DL_PATH',
|
||||
], [
|
||||
|
@ -342,7 +342,7 @@ EOF;
|
|||
|
||||
private function addSpongeVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['sponge']->id,
|
||||
'env_variable' => 'SPONGE_VERSION',
|
||||
], [
|
||||
|
@ -354,7 +354,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^([a-zA-Z0-9.\-_]+)$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['sponge']->id,
|
||||
'env_variable' => 'SERVER_JARFILE',
|
||||
], [
|
||||
|
@ -369,7 +369,7 @@ EOF;
|
|||
|
||||
private function addBungeecordVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['bungeecord']->id,
|
||||
'env_variable' => 'BUNGEE_VERSION',
|
||||
], [
|
||||
|
@ -381,7 +381,7 @@ EOF;
|
|||
'rules' => 'required|alpha_num|between:1,6',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['bungeecord']->id,
|
||||
'env_variable' => 'SERVER_JARFILE',
|
||||
], [
|
||||
|
@ -396,7 +396,7 @@ EOF;
|
|||
|
||||
private function addForgeVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['forge']->id,
|
||||
'env_variable' => 'SERVER_JARFILE',
|
||||
], [
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Pterodactyl\Models\Nest;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Pterodactyl\Models\Service;
|
||||
use Pterodactyl\Models\ServiceOption;
|
||||
use Pterodactyl\Models\ServiceVariable;
|
||||
use Pterodactyl\Models\EggVariable;
|
||||
use Pterodactyl\Traits\Services\CreatesServiceIndex;
|
||||
|
||||
class RustServiceTableSeeder extends Seeder
|
||||
|
@ -42,7 +42,7 @@ class RustServiceTableSeeder extends Seeder
|
|||
|
||||
private function addCoreService()
|
||||
{
|
||||
$this->service = Service::updateOrCreate([
|
||||
$this->service = Nest::updateOrCreate([
|
||||
'author' => config('pterodactyl.service.core'),
|
||||
'folder' => 'rust',
|
||||
], [
|
||||
|
@ -75,7 +75,7 @@ mkdir -p /mnt/server/.steam/sdk32
|
|||
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
|
||||
EOF;
|
||||
|
||||
$this->option['rustvanilla'] = ServiceOption::updateOrCreate([
|
||||
$this->option['rustvanilla'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'rustvanilla',
|
||||
], [
|
||||
|
@ -119,7 +119,7 @@ mkdir -p /mnt/server/.steam/sdk32
|
|||
cp -v /mnt/server/steam/linux32/steamclient.so /mnt/server/.steam/sdk32/steamclient.so
|
||||
EOF;
|
||||
|
||||
$this->option['rustoxide'] = ServiceOption::updateOrCreate([
|
||||
$this->option['rustoxide'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'rustoxide',
|
||||
], [
|
||||
|
@ -146,7 +146,7 @@ EOF;
|
|||
|
||||
private function addVanillaVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'HOSTNAME',
|
||||
], [
|
||||
|
@ -158,7 +158,7 @@ EOF;
|
|||
'rules' => 'required|string',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'LEVEL',
|
||||
], [
|
||||
|
@ -170,7 +170,7 @@ EOF;
|
|||
'rules' => 'required|string',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'DESCRIPTION',
|
||||
], [
|
||||
|
@ -182,7 +182,7 @@ EOF;
|
|||
'rules' => 'required|string',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'URL',
|
||||
], [
|
||||
|
@ -194,7 +194,7 @@ EOF;
|
|||
'rules' => 'url',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'WORLD_SIZE',
|
||||
], [
|
||||
|
@ -206,7 +206,7 @@ EOF;
|
|||
'rules' => 'required|integer',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'SEED',
|
||||
], [
|
||||
|
@ -218,7 +218,7 @@ EOF;
|
|||
'rules' => 'present',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'MAX_PLAYERS',
|
||||
], [
|
||||
|
@ -230,7 +230,7 @@ EOF;
|
|||
'rules' => 'required|integer',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'SERVER_IMG',
|
||||
], [
|
||||
|
@ -242,7 +242,7 @@ EOF;
|
|||
'rules' => 'url',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'RCON_PORT',
|
||||
], [
|
||||
|
@ -254,7 +254,7 @@ EOF;
|
|||
'rules' => 'required|integer',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'RCON_PASS',
|
||||
], [
|
||||
|
@ -266,7 +266,7 @@ EOF;
|
|||
'rules' => 'required',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustvanilla']->id,
|
||||
'env_variable' => 'ADDITIONAL_ARGS',
|
||||
], [
|
||||
|
@ -281,7 +281,7 @@ EOF;
|
|||
|
||||
private function addOxideVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'HOSTNAME',
|
||||
], [
|
||||
|
@ -293,7 +293,7 @@ EOF;
|
|||
'rules' => 'required|string',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'LEVEL',
|
||||
], [
|
||||
|
@ -305,7 +305,7 @@ EOF;
|
|||
'rules' => 'required|string',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'DESCRIPTION',
|
||||
], [
|
||||
|
@ -317,7 +317,7 @@ EOF;
|
|||
'rules' => 'required|string',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'URL',
|
||||
], [
|
||||
|
@ -329,7 +329,7 @@ EOF;
|
|||
'rules' => 'url',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'WORLD_SIZE',
|
||||
], [
|
||||
|
@ -341,7 +341,7 @@ EOF;
|
|||
'rules' => 'required|integer',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'SEED',
|
||||
], [
|
||||
|
@ -353,7 +353,7 @@ EOF;
|
|||
'rules' => 'present',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'MAX_PLAYERS',
|
||||
], [
|
||||
|
@ -365,7 +365,7 @@ EOF;
|
|||
'rules' => 'required|integer',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'SERVER_IMG',
|
||||
], [
|
||||
|
@ -377,7 +377,7 @@ EOF;
|
|||
'rules' => 'url',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'RCON_PORT',
|
||||
], [
|
||||
|
@ -389,7 +389,7 @@ EOF;
|
|||
'rules' => 'required|integer',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'RCON_PASS',
|
||||
], [
|
||||
|
@ -401,7 +401,7 @@ EOF;
|
|||
'rules' => 'required',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['rustoxide']->id,
|
||||
'env_variable' => 'ADDITIONAL_ARGS',
|
||||
], [
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Pterodactyl\Models\Nest;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Pterodactyl\Models\Service;
|
||||
use Pterodactyl\Models\ServiceOption;
|
||||
use Pterodactyl\Models\ServiceVariable;
|
||||
use Pterodactyl\Models\EggVariable;
|
||||
use Pterodactyl\Traits\Services\CreatesServiceIndex;
|
||||
|
||||
class SourceServiceTableSeeder extends Seeder
|
||||
|
@ -42,7 +42,7 @@ class SourceServiceTableSeeder extends Seeder
|
|||
|
||||
private function addCoreService()
|
||||
{
|
||||
$this->service = Service::updateOrCreate([
|
||||
$this->service = Nest::updateOrCreate([
|
||||
'author' => config('pterodactyl.service.core'),
|
||||
'folder' => 'srcds',
|
||||
], [
|
||||
|
@ -81,7 +81,7 @@ mkdir -p /mnt/server/.steam/sdk32
|
|||
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
|
||||
EOF;
|
||||
|
||||
$this->option['source'] = ServiceOption::updateOrCreate([
|
||||
$this->option['source'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'source',
|
||||
], [
|
||||
|
@ -99,7 +99,7 @@ EOF;
|
|||
'script_container' => 'ubuntu:16.04',
|
||||
]);
|
||||
|
||||
$this->option['insurgency'] = ServiceOption::updateOrCreate([
|
||||
$this->option['insurgency'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'insurgency',
|
||||
], [
|
||||
|
@ -115,7 +115,7 @@ EOF;
|
|||
'copy_script_from' => $this->option['source']->id,
|
||||
]);
|
||||
|
||||
$this->option['tf2'] = ServiceOption::updateOrCreate([
|
||||
$this->option['tf2'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'tf2',
|
||||
], [
|
||||
|
@ -161,7 +161,7 @@ mkdir -p /mnt/server/.steam/sdk32
|
|||
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
|
||||
EOF;
|
||||
|
||||
$this->option['ark'] = ServiceOption::updateOrCreate([
|
||||
$this->option['ark'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'ark',
|
||||
], [
|
||||
|
@ -205,7 +205,7 @@ mkdir -p /mnt/server/.steam/sdk32
|
|||
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
|
||||
EOF;
|
||||
|
||||
$this->option['csgo'] = ServiceOption::updateOrCreate([
|
||||
$this->option['csgo'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'csgo',
|
||||
], [
|
||||
|
@ -249,7 +249,7 @@ mkdir -p /mnt/server/.steam/sdk32
|
|||
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
|
||||
EOF;
|
||||
|
||||
$this->option['gmod'] = ServiceOption::updateOrCreate([
|
||||
$this->option['gmod'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'gmod',
|
||||
], [
|
||||
|
@ -280,7 +280,7 @@ EOF;
|
|||
|
||||
private function addInsurgencyVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['insurgency']->id,
|
||||
'env_variable' => 'SRCDS_APPID',
|
||||
], [
|
||||
|
@ -292,7 +292,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^(17705)$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['insurgency']->id,
|
||||
'env_variable' => 'SRCDS_GAME',
|
||||
], [
|
||||
|
@ -304,7 +304,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^(insurgency)$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['insurgency']->id,
|
||||
'env_variable' => 'SRCDS_MAP',
|
||||
], [
|
||||
|
@ -319,7 +319,7 @@ EOF;
|
|||
|
||||
private function addTF2Variables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['tf2']->id,
|
||||
'env_variable' => 'SRCDS_APPID',
|
||||
], [
|
||||
|
@ -331,7 +331,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^(232250)$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['tf2']->id,
|
||||
'env_variable' => 'SRCDS_GAME',
|
||||
], [
|
||||
|
@ -343,7 +343,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^(tf)$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['tf2']->id,
|
||||
'env_variable' => 'SRCDS_MAP',
|
||||
], [
|
||||
|
@ -358,7 +358,7 @@ EOF;
|
|||
|
||||
private function addArkVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['ark']->id,
|
||||
'env_variable' => 'ARK_PASSWORD',
|
||||
], [
|
||||
|
@ -370,7 +370,7 @@ EOF;
|
|||
'rules' => 'alpha_dash|between:1,100',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['ark']->id,
|
||||
'env_variable' => 'ARK_ADMIN_PASSWORD',
|
||||
], [
|
||||
|
@ -382,7 +382,7 @@ EOF;
|
|||
'rules' => 'alpha_dash|between:1,100',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['ark']->id,
|
||||
'env_variable' => 'SERVER_MAX_PLAYERS',
|
||||
], [
|
||||
|
@ -397,7 +397,7 @@ EOF;
|
|||
|
||||
private function addCSGOVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['csgo']->id,
|
||||
'env_variable' => 'SRCDS_MAP',
|
||||
], [
|
||||
|
@ -409,7 +409,7 @@ EOF;
|
|||
'rules' => 'required|string|alpha_dash',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['csgo']->id,
|
||||
'env_variable' => 'STEAM_ACC',
|
||||
], [
|
||||
|
@ -424,7 +424,7 @@ EOF;
|
|||
|
||||
private function addGMODVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['gmod']->id,
|
||||
'env_variable' => 'SRCDS_MAP',
|
||||
], [
|
||||
|
@ -436,7 +436,7 @@ EOF;
|
|||
'rules' => 'required|string|alpha_dash',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['gmod']->id,
|
||||
'env_variable' => 'STEAM_ACC',
|
||||
], [
|
||||
|
@ -451,7 +451,7 @@ EOF;
|
|||
|
||||
private function addCustomVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['source']->id,
|
||||
'env_variable' => 'SRCDS_APPID',
|
||||
], [
|
||||
|
@ -463,7 +463,7 @@ EOF;
|
|||
'rules' => 'required|numeric|digits_between:1,6',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['source']->id,
|
||||
'env_variable' => 'SRCDS_GAME',
|
||||
], [
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Pterodactyl\Models\Nest;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Pterodactyl\Models\Service;
|
||||
use Pterodactyl\Models\ServiceOption;
|
||||
use Pterodactyl\Models\ServiceVariable;
|
||||
use Pterodactyl\Models\EggVariable;
|
||||
use Pterodactyl\Traits\Services\CreatesServiceIndex;
|
||||
|
||||
class TerrariaServiceTableSeeder extends Seeder
|
||||
|
@ -42,7 +42,7 @@ class TerrariaServiceTableSeeder extends Seeder
|
|||
|
||||
private function addCoreService()
|
||||
{
|
||||
$this->service = Service::updateOrCreate([
|
||||
$this->service = Nest::updateOrCreate([
|
||||
'author' => config('pterodactyl.service.core'),
|
||||
'folder' => 'terraria',
|
||||
], [
|
||||
|
@ -70,7 +70,7 @@ curl -sSLO https://github.com/NyxStudios/TShock/releases/download/v${T_VERSION}/
|
|||
unzip -o tshock_${T_VERSION}.zip -d /mnt/server
|
||||
EOF;
|
||||
|
||||
$this->option['tshock'] = ServiceOption::updateOrCreate([
|
||||
$this->option['tshock'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'tshock',
|
||||
], [
|
||||
|
@ -89,7 +89,7 @@ EOF;
|
|||
|
||||
private function addVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['tshock']->id,
|
||||
'env_variable' => 'T_VERSION',
|
||||
], [
|
||||
|
@ -101,7 +101,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^([0-9_\.-]{5,10})$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['tshock']->id,
|
||||
'env_variable' => 'MAX_SLOTS',
|
||||
], [
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Pterodactyl\Models\Nest;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Pterodactyl\Models\Service;
|
||||
use Pterodactyl\Models\ServiceOption;
|
||||
use Pterodactyl\Models\ServiceVariable;
|
||||
use Pterodactyl\Models\EggVariable;
|
||||
use Pterodactyl\Traits\Services\CreatesServiceIndex;
|
||||
|
||||
class VoiceServiceTableSeeder extends Seeder
|
||||
|
@ -19,7 +19,7 @@ class VoiceServiceTableSeeder extends Seeder
|
|||
/**
|
||||
* The core service ID.
|
||||
*
|
||||
* @var Service
|
||||
* @var Nest
|
||||
*/
|
||||
protected $service;
|
||||
|
||||
|
@ -42,7 +42,7 @@ class VoiceServiceTableSeeder extends Seeder
|
|||
|
||||
private function addCoreService()
|
||||
{
|
||||
$this->service = Service::updateOrCreate([
|
||||
$this->service = Nest::updateOrCreate([
|
||||
'author' => config('pterodactyl.service.core'),
|
||||
'folder' => 'voice',
|
||||
], [
|
||||
|
@ -71,7 +71,7 @@ tar -xjvf murmur-static_x86-${MUMBLE_VERSION}.tar.bz2
|
|||
cp -r murmur-static_x86-${MUMBLE_VERSION}/* /mnt/server
|
||||
EOF;
|
||||
|
||||
$this->option['mumble'] = ServiceOption::updateOrCreate([
|
||||
$this->option['mumble'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'mumble',
|
||||
], [
|
||||
|
@ -124,7 +124,7 @@ logappend=0
|
|||
query_skipbruteforcecheck=0" > /mnt/server/ts3server.ini
|
||||
EOF;
|
||||
|
||||
$this->option['ts3'] = ServiceOption::updateOrCreate([
|
||||
$this->option['ts3'] = Egg::updateOrCreate([
|
||||
'service_id' => $this->service->id,
|
||||
'tag' => 'ts3',
|
||||
], [
|
||||
|
@ -143,7 +143,7 @@ EOF;
|
|||
|
||||
private function addVariables()
|
||||
{
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['mumble']->id,
|
||||
'env_variable' => 'MAX_USERS',
|
||||
], [
|
||||
|
@ -155,7 +155,7 @@ EOF;
|
|||
'rules' => 'required|numeric|digits_between:1,5',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['mumble']->id,
|
||||
'env_variable' => 'MUMBLE_VERSION',
|
||||
], [
|
||||
|
@ -167,7 +167,7 @@ EOF;
|
|||
'rules' => 'required|regex:/^([0-9_\.-]{5,8})$/',
|
||||
]);
|
||||
|
||||
ServiceVariable::updateOrCreate([
|
||||
EggVariable::updateOrCreate([
|
||||
'option_id' => $this->option['ts3']->id,
|
||||
'env_variable' => 'TS_VERSION',
|
||||
], [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue