s
This commit is contained in:
parent
3f0c80b3eb
commit
413e69a955
7 changed files with 18 additions and 7 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue