-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathStart-Jurymatic.ps1
36 lines (24 loc) · 994 Bytes
/
Start-Jurymatic.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<#
.NOTES
Script <> with <3 by @rasmuskriest
.SYNOPSIS
The final solution for creating jury booklets for events of the European Youth Parliament.
.DESCRIPTION
The final solution for creating jury booklets for events of the European Youth Parliament. This is script two out of two which starts an installed jurymatic instance.
.EXAMPLE
.\Start-Jurymatic.ps1
#>
#Requires -Version 3.0
$localip = Test-Connection -ComputerName (hostname) -Count 1 | Select-Object IPV4Address
Write-Output "Your local IP address: ${localip}:8000"
Write-Output "=============================="
if (Get-Command py.exe -errorAction SilentlyContinue) {
Invoke-Expression .\Scripts\activate.ps1
Start-Process http://localhost:8000
py.exe $PSScriptRoot\manage.py runserver 0.0.0.0:8000
}
else {
Invoke-Expression .\Scripts\activate.ps1
Start-Process http://localhost:8000
python.exe $PSScriptRoot\manage.py runserver 0.0.0.0:8000
}