instance($run); if ($instance === null) { return StepResult::fail('no_instance'); } $quota = (int) $instance->quota_gb; // No allowance recorded: setting "0 GB" would lock the customer out of // their own files, which is a far worse answer than leaving what is // there and letting somebody notice. if ($quota <= 0) { return StepResult::advance(); } $pve = $this->pve->forHost($instance->host); $occ = 'cd /opt/nextcloud && docker compose exec -T app php occ '; // Idempotent, like every other occ call in this pipeline: writing the // same value again is a no-op and exits 0. $this->guest($pve, $run, $occ.'config:app:set files default_quota --value='.escapeshellarg($quota.' GB')); return StepResult::advance(); } }