multi line rather than ampersands

This commit is contained in:
2025-03-30 15:13:06 +00:00
parent b27ba0b4c0
commit f7c32de49b

View File

@@ -35,10 +35,13 @@ class ProvisionServer implements ShouldQueue, ShouldBeEncrypted
// Download the provision script and execute it
// The script will run in the background
$result = $ssh->execute("set -x && wget --output-document=provision.sh \"{$provisionScriptUrl}\" && chmod +x provision.sh && ./provision.sh &");
$result = $ssh->execute([
'set -x',
'wget --output-document=provision.sh "' . $provisionScriptUrl . '"',
'chmod +x provision.sh',
'./provision.sh &',
]);
logger('executing script on server');
logger("set -x && wget --output-document=provision.sh \"{$provisionScriptUrl}\" && chmod +x provision.sh && ./provision.sh &");
if (! $result->isSuccessful()) {
logger('failed to execute script on server');
logger($result->getOutput());
@@ -50,6 +53,11 @@ class ProvisionServer implements ShouldQueue, ShouldBeEncrypted
return;
}
logger('script executed on server');
logger($result->getOutput());
logger($result->getErrorOutput());
logger($result->getExitCode());
$this->server->update([
'status' => ServerStatus::PROVISIONING,
]);