Prepare nextcloud initialization only once

This commit is contained in:
Manuel Thalmann 2023-07-25 18:05:33 +02:00
parent 971211246b
commit 463dea3d54

View file

@ -10,12 +10,12 @@ $null = New-Module {
choco install nextcloud-client -y --params="'/KeepUpdateCheck'"; choco install nextcloud-client -y --params="'/KeepUpdateCheck'";
} }
Write-Information "Ensuring all Let's Encrypt certificates are cached";
$null = Invoke-WebRequest https://valid-isrgrootx1.letsencrypt.org/;
if (-not (Test-Path $context.GetNextcloudConfigFile())) { if (-not (Test-Path $context.GetNextcloudConfigFile())) {
Write-Information "Setting up Nextcloud configuration"; Write-Information "Setting up Nextcloud configuration";
Write-Information "Ensuring all Let's Encrypt certificates are cached";
$null = Invoke-WebRequest https://valid-isrgrootx1.letsencrypt.org/;
while (-not (Test-Path $context.GetNextcloudConfigFile())) { while (-not (Test-Path $context.GetNextcloudConfigFile())) {
Write-Host "Nextcloud has been installed!"; Write-Host "Nextcloud has been installed!";
Read-Host "Please log in in the Nextcloud app and hit enter to continue"; Read-Host "Please log in in the Nextcloud app and hit enter to continue";