소스 검색

use hostname from env

Tobias Simetsreiter 3 년 전
부모
커밋
f1509322be
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      gitlab/groupusers.ps1
  2. 1 1
      lib/LogRotate.ps1

+ 1 - 1
gitlab/groupusers.ps1

@@ -10,7 +10,7 @@
 # This Script takes emails from pipe and group and access level from cli to invite them
 $GITLAB_INVITE = "$PSScriptRoot\gitlab-invite.ps1"
 
-Set-Log ([IO.Path]::GetFullPath("$PSScriptRoot\..\runtime\groupusers-$(hostname)-.log")) 1mb 2
+Set-Log ([IO.Path]::GetFullPath("$PSScriptRoot\..\runtime\groupusers-${env:computername}-.log")) 1mb 2
 
 
 foreach ($module in @("ActiveDirectory")){

+ 1 - 1
lib/LogRotate.ps1

@@ -1,5 +1,5 @@
 # all logging settins are here on top
-$logFile = "log-$(gc env:computername).log"
+$logFile = "log-${env:computername}.log"
 $logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL")
 $logSize = "100b"
 $logCount = 3