This commit is contained in:
Thijs Stobbelaar 2023-11-14 10:45:07 +01:00
parent 3f0c80b3eb
commit 413e69a955
7 changed files with 18 additions and 7 deletions

View file

@ -1,4 +1,10 @@
function new-lock {
[CmdletBinding()]
param (
[Parameter()]
[string]
$by
)
Write-Output 'Setting lock'
$lock = $true
$timeout = 10
@ -23,6 +29,9 @@ function new-lock {
$i++
}
New-Item -ItemType File -Path $lockFile | Out-Null
if ($by) {
$by | Out-File -FilePath $lockFile -Append
}
}
function remove-lock {