Skip to content

Commit

Permalink
Added option to pass in parameters to the entrypoint script.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellwest committed May 8, 2020
1 parent d27040f commit 60cb59e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions startup/startup.ps1
@@ -1,7 +1,8 @@
[CmdletBinding()]
param(
[Parameter(Mandatory = $false)]
[string]$EntryPointScriptPath = "C:\tools\entrypoints\iis\Development.ps1"
[string]$EntrypointScriptPath = "C:\tools\entrypoints\iis\Development.ps1",
[hashtable]$EntrypointParameters
)
Write-Host "Running startup.ps1"
Import-Module WebAdministration
Expand Down Expand Up @@ -35,5 +36,9 @@ foreach($hostheader in $hostHeaders) {
Set-HttpBinding -SiteName $website -HostHeader $hostheader
}

Write-Host "Running $($EntryPointScriptPath)"
& $EntryPointScriptPath
Write-Host "Running $($EntrypointScriptPath)"
if($EntrypointParameters) {
& $EntrypointScriptPath @EntrypointParameters
} else {
& $EntrypointScriptPath
}

0 comments on commit 60cb59e

Please sign in to comment.