boxweb page to be in box config

+ rename dil5_statemachine to dil5
This commit is contained in:
2025-05-28 11:59:48 +02:00
parent ebb3e16050
commit f91bb1e725
2 changed files with 8 additions and 4 deletions

View File

@ -13,4 +13,8 @@ eth2=192.168.1.2
[FRAPPY]
port=5000
cfg=dil5_statemachine
cfg=dil5
[BOXWEB]
port=80
page=dil5

View File

@ -167,7 +167,7 @@ After = network.target
[Service]
Environment=PYTHONPATH=/home/l_samenv/.local/lib/python3.11/site-packages/
ExecStart = /usr/bin/python3 /home/l_samenv/boxweb/flaskserver.py %i {port}
ExecStart = /usr/bin/python3 /home/l_samenv/boxweb/flaskserver.py {page} {port}
[Install]
WantedBy = multi-user.target
@ -275,9 +275,9 @@ def pip():
show.dirty = True
def boxweb(port=80, **opts):
def boxweb(port=80, page='main'):
port = int(port)
return port <= 1024, BOXWEB_SERVICE.format(port=port)
return port <= 1024, BOXWEB_SERVICE.format(port=port, page=page)
SERVICES = dict(router=router, display=display, frappy=frappy, boxweb=boxweb)