feat(installer): added a check for lstv2 already installed
This commit is contained in:
@@ -172,8 +172,15 @@ $plantFunness = {
|
|||||||
Write-Host "Removing services that are no longer used."
|
Write-Host "Removing services that are no longer used."
|
||||||
& $nssmPath remove "LogisticsSupportTool" confirm
|
& $nssmPath remove "LogisticsSupportTool" confirm
|
||||||
& $nssmPath remove $serviceAuth confirm
|
& $nssmPath remove $serviceAuth confirm
|
||||||
|
# & $nssmPath remove $serviceGateway confirm
|
||||||
|
# if($token -eq "usday1"){
|
||||||
|
# & $nssmPath remove $serviceOcme confirm
|
||||||
|
# }
|
||||||
Start-Sleep -Seconds 5
|
Start-Sleep -Seconds 5
|
||||||
|
|
||||||
|
$service = Get-Service -Name $serviceLstV2 -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
if(-not $service){
|
||||||
## adding in lstAdm
|
## adding in lstAdm
|
||||||
Write-Host "Adding $($serviceLstV2)... incase its missing."
|
Write-Host "Adding $($serviceLstV2)... incase its missing."
|
||||||
$commandToRun = "run start"
|
$commandToRun = "run start"
|
||||||
@@ -186,7 +193,7 @@ $plantFunness = {
|
|||||||
Write-Host "Setting recovery options"
|
Write-Host "Setting recovery options"
|
||||||
# Set recovery options
|
# Set recovery options
|
||||||
sc.exe failure $serviceLstV2 reset= 0 actions= restart/5000/restart/5000/restart/5000
|
sc.exe failure $serviceLstV2 reset= 0 actions= restart/5000/restart/5000/restart/5000
|
||||||
|
}
|
||||||
# Doing an install
|
# Doing an install
|
||||||
Write-Host "Running the install to make sure everything is updated."
|
Write-Host "Running the install to make sure everything is updated."
|
||||||
Set-Location $serverPath
|
Set-Location $serverPath
|
||||||
@@ -235,7 +242,6 @@ $plantFunness = {
|
|||||||
Start-Service -DisplayName $serviceLstV2
|
Start-Service -DisplayName $serviceLstV2
|
||||||
Start-Sleep -Seconds 1
|
Start-Sleep -Seconds 1
|
||||||
Write-Host "$($server) finished updating"
|
Write-Host "$($server) finished updating"
|
||||||
|
|
||||||
if($token -eq "usday1"){
|
if($token -eq "usday1"){
|
||||||
Write-Host "Starting $($serviceOcme)"
|
Write-Host "Starting $($serviceOcme)"
|
||||||
Start-Service -DisplayName $serviceOcme
|
Start-Service -DisplayName $serviceOcme
|
||||||
|
|||||||
Reference in New Issue
Block a user