sluggin
This commit is contained in:
@@ -29,15 +29,15 @@ class ProvisionServer implements ShouldQueue, ShouldBeEncrypted
|
|||||||
|
|
||||||
$provisionScriptUrl = route('provision-script', [
|
$provisionScriptUrl = route('provision-script', [
|
||||||
'sudo_password' => $this->sudoPassword,
|
'sudo_password' => $this->sudoPassword,
|
||||||
'hostname' => $this->server->hostname,
|
'hostname' => str($this->server->name)->slug()->toString(),
|
||||||
'server_id' => $this->server->id,
|
'server_id' => $this->server->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Download the provision script and execute it
|
// Download the provision script and execute it
|
||||||
// The script will run in the background
|
// The script will run in the background
|
||||||
$ssh->execute("cd ~ && wget --quiet --output-document=provision.sh \"{$provisionScriptUrl}\" && chmod +x provision.sh && ./provision.sh &");
|
$ssh->execute("wget --quiet --output-document=provision.sh \"{$provisionScriptUrl}\" && chmod +x provision.sh && ./provision.sh &");
|
||||||
logger('executing script on server');
|
logger('executing script on server');
|
||||||
logger("cd ~ && wget --quiet --output-document=provision.sh \"{$provisionScriptUrl}\" && chmod +x provision.sh && ./provision.sh &");
|
logger("wget --quiet --output-document=provision.sh \"{$provisionScriptUrl}\" && chmod +x provision.sh && ./provision.sh &");
|
||||||
|
|
||||||
$this->server->update([
|
$this->server->update([
|
||||||
'status' => ServerStatus::PROVISIONING,
|
'status' => ServerStatus::PROVISIONING,
|
||||||
|
|||||||
Reference in New Issue
Block a user