Include default installation scripts, as well as ability to symlink a script

This commit is contained in:
Dane Everitt 2017-04-27 16:16:57 -04:00
parent 77b1a258d9
commit 30b4934013
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
12 changed files with 346 additions and 11 deletions

View file

@ -69,6 +69,21 @@ class TerrariaServiceTableSeeder extends Seeder
private function addCoreOptions()
{
$script = <<<'EOF'
#!/bin/ash
# TShock Installation Script
#
# Server Files: /mnt/server
apk update
apk add curl unzip
cd /tmp
curl -sSLO https://github.com/NyxStudios/TShock/releases/download/v${T_VERSION}/tshock_${T_VERSION}.zip
unzip -o tshock_${T_VERSION}.zip -d /mnt/server
EOF;
$this->option['tshock'] = ServiceOption::updateOrCreate([
'service_id' => $this->service->id,
'tag' => 'tshock',
@ -82,6 +97,7 @@ class TerrariaServiceTableSeeder extends Seeder
'config_logs' => '{"custom": false, "location": "ServerLog.txt"}',
'config_stop' => 'exit',
'startup' => null,
'script_install' => $script,
]);
}