Print debug info about Nextcloud sync
This commit is contained in:
parent
87d99f8ede
commit
7ba8fb50b2
1 changed files with 7 additions and 0 deletions
|
@ -248,6 +248,8 @@ class Context {
|
|||
}
|
||||
|
||||
[void] AddNextcloudSync([string] $localPath, [string] $targetPath, [bool] $virtualFiles) {
|
||||
Write-Host "Adding a Nextcloud sync";
|
||||
Write-Information "$targetPath <=> $localPath";
|
||||
$pattern = "^\d+\\Folders(?:WithPlaceholders)?\\(\d+)";
|
||||
|
||||
$folderID = (
|
||||
|
@ -265,6 +267,7 @@ class Context {
|
|||
$configName += "WithPlaceholders";
|
||||
}
|
||||
|
||||
Write-Information "Stopping Nextcloud process";
|
||||
$nextcloudProcess = Get-Process nextcloud;
|
||||
$nextcloudPath = [string]$nextcloudProcess[0].Path;
|
||||
$nextcloudProcess | Stop-Process -Force;
|
||||
|
@ -288,6 +291,10 @@ class Context {
|
|||
$_;
|
||||
} | Set-Content $this.GetNextcloudConfigFile();
|
||||
|
||||
Write-Information "New nextcloud config:";
|
||||
Write-Information Get-Content $($this.GetNextcloudConfigFile());
|
||||
|
||||
Write-Information "Restarting Nextcloud";
|
||||
Start-Process $nextcloudPath;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue