Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion hieradata/common.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
url: 'http://152.78.162.68:8080'
hostname: raspberrypi.local
browser_type: firefox

timezone: Europe/London

Expand All @@ -14,3 +13,6 @@ public_compbox_hostname: srcomp.studentrobotics.org
# for things which ought to be on the venue network. This will fail more clearly
# if it doesn't work, which is preferable to silent breakage.
compbox_hostname: "%{hiera('venue_compbox_hostname')}"

remote_ssh_port: 2222
is_livestream: false
10 changes: 6 additions & 4 deletions macs-to-names.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
hostname: {name}
remote_ssh_port: {remote_ssh_port}
compbox_hostname: "%{{hiera('{compbox}_compbox_hostname')}}"
is_livestream: {is_livestream}
'''

def tidy(lines):
Expand All @@ -34,14 +35,14 @@ def tidy(lines):

def build_url(page):
if page == 'livestream':
return LIVESTREAM_URL
return LIVESTREAM_URL, 'true'

parts = page.split('?')
if len(parts) == 1:
return PAGE_TEMPLATE.format(page=page, query='')
return PAGE_TEMPLATE.format(page=page, query=''), 'false'
else:
query = '?' + parts[1]
return PAGE_TEMPLATE.format(page=parts[0], query=query)
return PAGE_TEMPLATE.format(page=parts[0], query=query), 'false'

def build_name(ident, page):
parts = page.split('?')
Expand Down Expand Up @@ -69,7 +70,7 @@ def build_port(mac):
for line in lines:
ident, mac, compbox, page = line.split()
name = build_name(ident, page)
url = build_url(page)
url, is_livestream = build_url(page)

remote_ssh_port = build_port(mac)
assert remote_ssh_port not in port_to_name
Expand All @@ -83,6 +84,7 @@ def build_port(mac):
url=url,
remote_ssh_port=remote_ssh_port,
compbox=compbox,
is_livestream=is_livestream,
))

with open('pi-ssh-config', mode='w') as f:
Expand Down
11 changes: 11 additions & 0 deletions modules/srcomp_kiosk/files/10-blanking.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Section "Extensions"
Option "DPMS" "Disable"
EndSection

Section "ServerLayout"
Identifier "ServerLayout0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
Option "BlankTime" "0"
EndSection
1 change: 0 additions & 1 deletion modules/srcomp_kiosk/files/firefox-profile/addons.json

This file was deleted.

Loading