Files
boxtools/start_frappy
Markus Zolliker 86eef4e0f6 make sure frappy is started on boot
this is a not-so-easy problem of timing

change includes a 'start_frappy' script, which gets port and
cfg from the box config file. so install does no longer need
to be executed when cfg or port is changed
2025-06-27 11:35:03 +02:00

19 lines
427 B
Python
Executable File

#!/usr/bin/env python
import os
import time
from pathlib import Path
from utils import BoxInfo
box = BoxInfo()
def start_frappy(cfg, port=None):
# os.chdir(Path('~/frappy').expanduser())
if port is None:
portarg = ''
else:
portarg = f'-p {port} '
os.system(f"{str(Path('~').expanduser() / 'frappy/bin/frappy-server')} {portarg}{cfg}")
time.sleep(10)
start_frappy(**box.read_config('FRAPPY'))