From 2a6b48753a99f1f692b3ced88880d5786d018d48 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 6 Jul 2017 21:51:38 -0400 Subject: [PATCH 1/8] Add Rust service --- database/seeds/RustServiceTableSeeder.php | 262 ++++++++++++++++++++++ 1 file changed, 262 insertions(+) create mode 100644 database/seeds/RustServiceTableSeeder.php diff --git a/database/seeds/RustServiceTableSeeder.php b/database/seeds/RustServiceTableSeeder.php new file mode 100644 index 000000000..65b2a9951 --- /dev/null +++ b/database/seeds/RustServiceTableSeeder.php @@ -0,0 +1,262 @@ +. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +use Illuminate\Database\Seeder; +use Pterodactyl\Models\Service; +use Pterodactyl\Models\ServiceOption; +use Pterodactyl\Models\ServiceVariable; + +class SourceServiceTableSeeder extends Seeder +{ + /** + * The core service ID. + * + * @var Models\Service + */ + protected $service; + + /** + * Stores all of the option objects. + * + * @var array + */ + protected $option = []; + + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + $this->addCoreService(); + $this->addCoreOptions(); + $this->addVariables(); + } + + private function addCoreService() + { + $this->service = Service::updateOrCreate([ + 'author' => config('pterodactyl.service.core'), + 'folder' => 'rust', + ], [ + 'name' => 'Rust', + 'description' => 'The only aim in Rust is to survive. To do this you will need to overcome struggles such as hunger, thirst and cold. Build a fire. Build a shelter. Kill animals for meat. Protect yourself from other players, and kill them for meat. Create alliances with other players and form a town. Do whatever it takes to survive.', + 'startup' => './RustDedicated -batchmode +server.port {{SERVER_PORT}} +server.identity "rust" +rcon.port {{RCON_PORT}} +rcon.web true +server.hostname \"{{HOSTNAME}}\" +server.level \"{{LEVEL}}\" +server.description \"{{DESCRIPTION}}\" +server.url \"{{URL}}\" +server.headerimage \"{{SERVER_IMG}}\" +server.worldsize \"{{WORLD_SIZE}}\" +server.seed \"{{SEED}}\" +server.maxplayers {{MAX_PLAYERS}} +rcon.password \"{{RCON_PASS}}\" {{ADDITIONAL_ARGS}}', + 'index_file' => Service::defaultIndexFile(), + ]); + } + + private function addCoreOptions() + { + $script = <<<'EOF' +apt update +apt -y --no-install-recommends install curl lib32gcc1 ca-certificates + +cd /tmp +curl -sSL -o steamcmd.tar.gz http://media.steampowered.com/installer/steamcmd_linux.tar.gz + +mkdir -p /mnt/server/steam +tar -xzvf steamcmd.tar.gz -C /mnt/server/steam +cd /mnt/server/steam + +chown -R root:root /mnt + +export HOME=/mnt/server +./steamcmd.sh +login anonymous +force_install_dir /mnt/server +app_update 258550 +quit + +mkdir -p /mnt/server/.steam/sdk32 +cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so +EOF; + + $this->option['rustvanilla'] = ServiceOption::updateOrCreate([ + 'service_id' => $this->service->id, + 'tag' => 'rustvanilla', + ], [ + 'name' => 'Vanilla', + 'description' => 'Vanilla Rust server.', + 'docker_image' => 'tenten8401/pterodactyl-rust', + 'config_startup' => '{"done": "Server startup complete", "userInteraction": []}', + 'config_files' => '{}', + 'config_logs' => '{"custom": false, "location": "latest.log"}', + 'config_stop' => 'quit', + 'config_from' => null, + 'startup' => null, + 'script_install' => $script, + 'script_entry' => 'bash', + 'script_container' => 'ubuntu:latest', + ]); + } + + private function addVariables() + { + $this->addVanillaVariables(); + } + + private function addVanillaVariables() + { + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'LD_LIBRARY_PATH', + ], [ + 'name' => 'LD_LIBRARY_PATH', + 'description' => 'A fix for Rust not starting.', + 'default_value' => './RustDedicated_Data/Plugins/x86_64', + 'user_viewable' => 0, + 'user_editable' => 0, + 'rules' => 'required', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'HOSTNAME', + ], [ + 'name' => 'Server Name', + 'description' => 'The name of your server in the public server list.', + 'default_value' => 'A Rust Server', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|string', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'LEVEL', + ], [ + 'name' => 'Level', + 'description' => 'The world file for Rust to use.', + 'default_value' => 'Procedural Map', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|string', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'DESCRIPTION', + ], [ + 'name' => 'Description', + 'description' => 'The description under your server title. Commonly used for rules & info.', + 'default_value' => 'Powered by Pterodactyl', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'URL', + ], [ + 'name' => 'URL', + 'description' => 'The URL for your server. This is what comes up when clicking the "Visit Website" button.', + 'default_value' => 'http://pterodactyl.io', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'url', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'WORLD_SIZE', + ], [ + 'name' => 'World Size', + 'description' => 'The world size for a procedural map.', + 'default_value' => '3000', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|integer', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'SEED', + ], [ + 'name' => 'World Seed', + 'description' => 'The seed for a procedural map.', + 'default_value' => '', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'present', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'MAX_PLAYERS', + ], [ + 'name' => 'Max Players', + 'description' => 'The maximum amount of players allowed in the server at once.', + 'default_value' => '40', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|integer', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'SERVER_IMG', + ], [ + 'name' => 'Server Header Image', + 'description' => 'The header image for the top of your server listing.', + 'default_value' => '', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'url', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'RCON_PORT', + ], [ + 'name' => 'RCON Port', + 'description' => 'Port for RCON connections.', + 'default_value' => '8401', + 'user_viewable' => 1, + 'user_editable' => 0, + 'rules' => 'required|integer', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'RCON_PASS', + ], [ + 'name' => 'RCON Password', + 'description' => 'Remote console access password.', + 'default_value' => 'CHANGEME', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustvanilla']->id, + 'env_variable' => 'ADDITIONAL_ARGS', + ], [ + 'name' => 'Additional Arguments', + 'description' => 'Add additional startup parameters to the server.', + 'default_value' => '', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'present', + ]); + } +} From f230b194ff5a96133978f5ad51070ecb41d86bb0 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 6 Jul 2017 22:08:49 -0400 Subject: [PATCH 2/8] Add Rust to seeder & rename class to appropriate name --- database/seeds/DatabaseSeeder.php | 1 + database/seeds/RustServiceTableSeeder.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index e6b59672b..ae48c7c82 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -16,6 +16,7 @@ class DatabaseSeeder extends Seeder $this->call(MinecraftServiceTableSeeder::class); $this->call(SourceServiceTableSeeder::class); + $this->call(RustServiceTableSeeder::class); $this->call(TerrariaServiceTableSeeder::class); $this->call(VoiceServiceTableSeeder::class); diff --git a/database/seeds/RustServiceTableSeeder.php b/database/seeds/RustServiceTableSeeder.php index 65b2a9951..01f219341 100644 --- a/database/seeds/RustServiceTableSeeder.php +++ b/database/seeds/RustServiceTableSeeder.php @@ -26,7 +26,7 @@ use Pterodactyl\Models\Service; use Pterodactyl\Models\ServiceOption; use Pterodactyl\Models\ServiceVariable; -class SourceServiceTableSeeder extends Seeder +class RustServiceTableSeeder extends Seeder { /** * The core service ID. From a6bef1b71b35aec4d6e1b1d9beace898a0a151b9 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 6 Jul 2017 22:17:51 -0400 Subject: [PATCH 3/8] Fix StyleCI complaints --- database/seeds/RustServiceTableSeeder.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/database/seeds/RustServiceTableSeeder.php b/database/seeds/RustServiceTableSeeder.php index 01f219341..862254132 100644 --- a/database/seeds/RustServiceTableSeeder.php +++ b/database/seeds/RustServiceTableSeeder.php @@ -126,7 +126,7 @@ EOF; 'user_editable' => 0, 'rules' => 'required', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'HOSTNAME', @@ -138,7 +138,7 @@ EOF; 'user_editable' => 1, 'rules' => 'required|string', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'LEVEL', @@ -150,7 +150,7 @@ EOF; 'user_editable' => 1, 'rules' => 'required|string', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'DESCRIPTION', @@ -162,7 +162,7 @@ EOF; 'user_editable' => 1, 'rules' => 'required', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'URL', @@ -174,7 +174,7 @@ EOF; 'user_editable' => 1, 'rules' => 'url', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'WORLD_SIZE', @@ -186,7 +186,7 @@ EOF; 'user_editable' => 1, 'rules' => 'required|integer', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'SEED', @@ -198,7 +198,7 @@ EOF; 'user_editable' => 1, 'rules' => 'present', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'MAX_PLAYERS', @@ -210,7 +210,7 @@ EOF; 'user_editable' => 1, 'rules' => 'required|integer', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'SERVER_IMG', @@ -222,7 +222,7 @@ EOF; 'user_editable' => 1, 'rules' => 'url', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'RCON_PORT', @@ -234,7 +234,7 @@ EOF; 'user_editable' => 0, 'rules' => 'required|integer', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'RCON_PASS', @@ -246,7 +246,7 @@ EOF; 'user_editable' => 1, 'rules' => 'required', ]); - + ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'ADDITIONAL_ARGS', From 951baaca54e0cc1dad2a137ff4cb68ba2851cf94 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 8 Jul 2017 17:09:01 -0400 Subject: [PATCH 4/8] Specify ubuntu version & add string validation --- database/seeds/RustServiceTableSeeder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/seeds/RustServiceTableSeeder.php b/database/seeds/RustServiceTableSeeder.php index 862254132..0c5269a3b 100644 --- a/database/seeds/RustServiceTableSeeder.php +++ b/database/seeds/RustServiceTableSeeder.php @@ -104,7 +104,7 @@ EOF; 'startup' => null, 'script_install' => $script, 'script_entry' => 'bash', - 'script_container' => 'ubuntu:latest', + 'script_container' => 'ubuntu:16.04', ]); } @@ -160,7 +160,7 @@ EOF; 'default_value' => 'Powered by Pterodactyl', 'user_viewable' => 1, 'user_editable' => 1, - 'rules' => 'required', + 'rules' => 'required|string', ]); ServiceVariable::updateOrCreate([ From ee0211eaddf8f5ee8826321fde2b781bc28319f7 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 9 Jul 2017 21:20:09 -0400 Subject: [PATCH 5/8] Change docker container to quay.io/pterodactyl/core:rust --- database/seeds/RustServiceTableSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/seeds/RustServiceTableSeeder.php b/database/seeds/RustServiceTableSeeder.php index 0c5269a3b..ebba95136 100644 --- a/database/seeds/RustServiceTableSeeder.php +++ b/database/seeds/RustServiceTableSeeder.php @@ -95,7 +95,7 @@ EOF; ], [ 'name' => 'Vanilla', 'description' => 'Vanilla Rust server.', - 'docker_image' => 'tenten8401/pterodactyl-rust', + 'docker_image' => 'quay.io/pterodactyl/core:rust', 'config_startup' => '{"done": "Server startup complete", "userInteraction": []}', 'config_files' => '{}', 'config_logs' => '{"custom": false, "location": "latest.log"}', From 4957c95189a4c57ad5f2e658cd5971042fa42472 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 9 Jul 2017 22:05:08 -0400 Subject: [PATCH 6/8] OxideMod support --- database/seeds/RustServiceTableSeeder.php | 194 ++++++++++++++++++++-- 1 file changed, 182 insertions(+), 12 deletions(-) diff --git a/database/seeds/RustServiceTableSeeder.php b/database/seeds/RustServiceTableSeeder.php index ebba95136..d44440730 100644 --- a/database/seeds/RustServiceTableSeeder.php +++ b/database/seeds/RustServiceTableSeeder.php @@ -106,27 +106,62 @@ EOF; 'script_entry' => 'bash', 'script_container' => 'ubuntu:16.04', ]); + + + $script = <<<'EOF' +apt update +apt -y --no-install-recommends install curl unzip lib32gcc1 ca-certificates + +cd /tmp +curl -sSL -o steamcmd.tar.gz http://media.steampowered.com/installer/steamcmd_linux.tar.gz + +mkdir -p /mnt/server/steam +tar -xzvf steamcmd.tar.gz -C /mnt/server/steam +cd /mnt/server/steam + +chown -R root:root /mnt + +export HOME=/mnt/server +./steamcmd.sh +login anonymous +force_install_dir /mnt/server +app_update 258550 +quit + +cd /mnt/server +curl https://dl.bintray.com/oxidemod/builds/Oxide-Rust.zip > oxide.zip +unzip oxide.zip +rm oxide.zip +echo "This file is used to determine whether the server is an OxideMod server or not. +Do not delete this file or you may loose OxideMod auto updating from the server." > OXIDE_FLAG + +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([ + 'service_id' => $this->service->id, + 'tag' => 'rustoxide', + ], [ + 'name' => 'OxideMod', + 'description' => 'OxideMod Rust server.', + 'docker_image' => 'quay.io/pterodactyl/core:rust', + 'config_startup' => '{"done": "Server startup complete", "userInteraction": []}', + 'config_files' => '{}', + 'config_logs' => '{"custom": false, "location": "latest.log"}', + 'config_stop' => 'quit', + 'config_from' => null, + 'startup' => null, + 'script_install' => $script, + 'script_entry' => 'bash', + 'script_container' => 'ubuntu:16.04', + ]); } private function addVariables() { $this->addVanillaVariables(); + $this->addOxideVariables(); } private function addVanillaVariables() { - ServiceVariable::updateOrCreate([ - 'option_id' => $this->option['rustvanilla']->id, - 'env_variable' => 'LD_LIBRARY_PATH', - ], [ - 'name' => 'LD_LIBRARY_PATH', - 'description' => 'A fix for Rust not starting.', - 'default_value' => './RustDedicated_Data/Plugins/x86_64', - 'user_viewable' => 0, - 'user_editable' => 0, - 'rules' => 'required', - ]); - ServiceVariable::updateOrCreate([ 'option_id' => $this->option['rustvanilla']->id, 'env_variable' => 'HOSTNAME', @@ -259,4 +294,139 @@ EOF; 'rules' => 'present', ]); } + + private function addOxideVariables() + { + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'HOSTNAME', + ], [ + 'name' => 'Server Name', + 'description' => 'The name of your server in the public server list.', + 'default_value' => 'A Rust Server', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|string', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'LEVEL', + ], [ + 'name' => 'Level', + 'description' => 'The world file for Rust to use.', + 'default_value' => 'Procedural Map', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|string', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'DESCRIPTION', + ], [ + 'name' => 'Description', + 'description' => 'The description under your server title. Commonly used for rules & info.', + 'default_value' => 'Powered by Pterodactyl', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|string', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'URL', + ], [ + 'name' => 'URL', + 'description' => 'The URL for your server. This is what comes up when clicking the "Visit Website" button.', + 'default_value' => 'http://pterodactyl.io', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'url', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'WORLD_SIZE', + ], [ + 'name' => 'World Size', + 'description' => 'The world size for a procedural map.', + 'default_value' => '3000', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|integer', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'SEED', + ], [ + 'name' => 'World Seed', + 'description' => 'The seed for a procedural map.', + 'default_value' => '', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'present', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'MAX_PLAYERS', + ], [ + 'name' => 'Max Players', + 'description' => 'The maximum amount of players allowed in the server at once.', + 'default_value' => '40', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required|integer', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'SERVER_IMG', + ], [ + 'name' => 'Server Header Image', + 'description' => 'The header image for the top of your server listing.', + 'default_value' => '', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'url', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'RCON_PORT', + ], [ + 'name' => 'RCON Port', + 'description' => 'Port for RCON connections.', + 'default_value' => '8401', + 'user_viewable' => 1, + 'user_editable' => 0, + 'rules' => 'required|integer', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'RCON_PASS', + ], [ + 'name' => 'RCON Password', + 'description' => 'Remote console access password.', + 'default_value' => 'CHANGEME', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'required', + ]); + + ServiceVariable::updateOrCreate([ + 'option_id' => $this->option['rustoxide']->id, + 'env_variable' => 'ADDITIONAL_ARGS', + ], [ + 'name' => 'Additional Arguments', + 'description' => 'Add additional startup parameters to the server.', + 'default_value' => '', + 'user_viewable' => 1, + 'user_editable' => 1, + 'rules' => 'present', + ]); + } } From c746baf41616486443f364cb683a865e4c80587c Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 9 Jul 2017 22:06:14 -0400 Subject: [PATCH 7/8] Remove pesky newline for StyleCI --- database/seeds/RustServiceTableSeeder.php | 1 - 1 file changed, 1 deletion(-) diff --git a/database/seeds/RustServiceTableSeeder.php b/database/seeds/RustServiceTableSeeder.php index d44440730..2805cb556 100644 --- a/database/seeds/RustServiceTableSeeder.php +++ b/database/seeds/RustServiceTableSeeder.php @@ -107,7 +107,6 @@ EOF; 'script_container' => 'ubuntu:16.04', ]); - $script = <<<'EOF' apt update apt -y --no-install-recommends install curl unzip lib32gcc1 ca-certificates From 093114e5c281b3bd2541e0177d5b993a8697c774 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 10 Jul 2017 10:34:26 -0400 Subject: [PATCH 8/8] Absolute paths in install script --- database/seeds/RustServiceTableSeeder.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/database/seeds/RustServiceTableSeeder.php b/database/seeds/RustServiceTableSeeder.php index 2805cb556..681d97178 100644 --- a/database/seeds/RustServiceTableSeeder.php +++ b/database/seeds/RustServiceTableSeeder.php @@ -123,12 +123,11 @@ chown -R root:root /mnt export HOME=/mnt/server ./steamcmd.sh +login anonymous +force_install_dir /mnt/server +app_update 258550 +quit -cd /mnt/server -curl https://dl.bintray.com/oxidemod/builds/Oxide-Rust.zip > oxide.zip -unzip oxide.zip -rm oxide.zip +curl "https://dl.bintray.com/oxidemod/builds/Oxide-Rust.zip" > /mnt/server/oxide.zip +unzip -o /mnt/server/oxide.zip -d /mnt/server +rm /mnt/server/oxide.zip echo "This file is used to determine whether the server is an OxideMod server or not. -Do not delete this file or you may loose OxideMod auto updating from the server." > OXIDE_FLAG +Do not delete this file or you may loose OxideMod auto updating from the server." > /mnt/server/OXIDE_FLAG mkdir -p /mnt/server/.steam/sdk32 cp -v /mnt/server/steam/linux32/steamclient.so /mnt/server/.steam/sdk32/steamclient.so