Kill Nextcloud while editing config
This commit is contained in:
parent
8d28171c6c
commit
a5bf93f5ed
1 changed files with 6 additions and 1 deletions
|
@ -224,7 +224,10 @@ class Context {
|
||||||
}
|
}
|
||||||
|
|
||||||
[void] AddNextcloudSync([string] $localPath, [string] $targetPath, [bool] $virtualFiles) {
|
[void] AddNextcloudSync([string] $localPath, [string] $targetPath, [bool] $virtualFiles) {
|
||||||
$pattern = "^\d+\\Folders(?:WithPlaceholders)?\\(\d+)"
|
$pattern = "^\d+\\Folders(?:WithPlaceholders)?\\(\d+)";
|
||||||
|
$nextcloudProcess = Get-Process nextcloud;
|
||||||
|
$nextcloudPath = $nextcloudProcess.Path;
|
||||||
|
$nextcloudProcess | Stop-Process -Force;
|
||||||
|
|
||||||
$folderID = (
|
$folderID = (
|
||||||
Get-Content $($this.GetNextcloudConfigFile()) | `
|
Get-Content $($this.GetNextcloudConfigFile()) | `
|
||||||
|
@ -243,6 +246,8 @@ class Context {
|
||||||
@(
|
@(
|
||||||
"0\$configName\$folderID\localPath=$localPath",
|
"0\$configName\$folderID\localPath=$localPath",
|
||||||
"0\$configName\$folderID\targetPath=$targetPath"));
|
"0\$configName\$folderID\targetPath=$targetPath"));
|
||||||
|
|
||||||
|
Start-Process $nextcloudPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
[void] Reboot() {
|
[void] Reboot() {
|
||||||
|
|
Loading…
Reference in a new issue