feat: able to delete configuration from server
This commit is contained in:
@@ -43,6 +43,18 @@ class StandaloneMysql extends BaseModel
|
||||
$database->tags()->detach();
|
||||
});
|
||||
}
|
||||
public function workdir()
|
||||
{
|
||||
return database_configuration_dir() . "/{$this->uuid}";
|
||||
}
|
||||
public function delete_configurations()
|
||||
{
|
||||
$server = data_get($this, 'destination.server');
|
||||
$workdir = $this->workdir();
|
||||
if (str($workdir)->endsWith($this->uuid)) {
|
||||
instant_remote_process(["rm -rf " . $this->workdir()], $server, false);
|
||||
}
|
||||
}
|
||||
public function realStatus()
|
||||
{
|
||||
return $this->getRawOriginal('status');
|
||||
|
||||
Reference in New Issue
Block a user