This commit is contained in:
Lanta 2023-11-14 10:45:07 +01:00
parent c590becf0a
commit 38bd9ae1df
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 {