From 71b3a49ff3f4ee400eee2fe7e4fe0493b1c3e496 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 15 Dec 2023 17:51:07 +0100 Subject: [PATCH] wip #6549 @2 --- app/Jobs/HostingUpdate.php | 4 ++-- app/Models/FluidbookExternalInstallServer.php | 4 +++- bin/startup.sh | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Jobs/HostingUpdate.php b/app/Jobs/HostingUpdate.php index 3078d0f7a..a1c7f3498 100644 --- a/app/Jobs/HostingUpdate.php +++ b/app/Jobs/HostingUpdate.php @@ -12,8 +12,8 @@ use Cubist\Util\Text; class HostingUpdate extends Base { protected static $_data = [ - 'hosting' => ['host' => 'clockwork.cubedesigners.com', 'basepath' => '/data/fluidbook/hosting'], - 'hosting2' => ['host' => 'clockwork.cubedesigners.com', 'basepath' => '/data/fluidbook/hosting2'], + 'hosting' => ['host' => 'godzilla.cubedesigners.com', 'basepath' => '/data/fluidbook/hosting'], + 'hosting2' => ['host' => 'godzilla.cubedesigners.com', 'basepath' => '/data/fluidbook/hosting2'], 'ushosting' => ['host' => 'kingkong.cubedesigners.com', 'basepath' => '/home/fluidbook/data/hosting'], ]; diff --git a/app/Models/FluidbookExternalInstallServer.php b/app/Models/FluidbookExternalInstallServer.php index 126cadef1..3b5da904f 100644 --- a/app/Models/FluidbookExternalInstallServer.php +++ b/app/Models/FluidbookExternalInstallServer.php @@ -3,6 +3,7 @@ namespace App\Models; use App\Http\Controllers\Admin\Operations\ServerOperation; +use App\Jobs\HostingUpdate; use Cubist\Backpack\Magic\Fields\Checkbox; use Cubist\Backpack\Magic\Fields\Table; use Cubist\Backpack\Magic\Fields\Textarea; @@ -46,7 +47,7 @@ class FluidbookExternalInstallServer extends ExternalServer public function setFields() { $hostingProtocols = static::getHostingProtocols(); - $nothostingProtocols = array_diff(array_keys($this->getProtocols()),$hostingProtocols); + $nothostingProtocols = array_diff(array_keys($this->getProtocols()), $hostingProtocols); parent::setFields(); $this->getField('base_url')->setAttribute('when', ['protocol' => $nothostingProtocols]); @@ -85,6 +86,7 @@ class FluidbookExternalInstallServer extends ExternalServer public function onSaved(): bool { $this->updateHtaccess(); + dispatch(new HostingUpdate()); return parent::onSaved(); } diff --git a/bin/startup.sh b/bin/startup.sh index 68f910215..0c28109a9 100644 --- a/bin/startup.sh +++ b/bin/startup.sh @@ -44,14 +44,14 @@ mkdir -p /mnt/hosting if mountpoint -q "/mnt/hosting"; then : else - sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o uid=1002 -o gid=33 -o allow_other fluidbook@clockwork.cubedesigners.com:/data/fluidbook/hosting /mnt/hosting + sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o uid=1002 -o gid=33 -o allow_other fluidbook@godzilla.cubedesigners.com:/data/fluidbook/hosting /mnt/hosting fi mkdir -p /mnt/hosting2 if mountpoint -q "/mnt/hosting2"; then : else - sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o uid=1002 -o gid=33 -o allow_other fluidbook@clockwork.cubedesigners.com:/data/fluidbook/hosting2 /mnt/hosting2 + sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o uid=1002 -o gid=33 -o allow_other fluidbook@godzilla.cubedesigners.com:/data/fluidbook/hosting2 /mnt/hosting2 fi mkdir -p /application/usstorage -- 2.39.5