Files
RASCSI/docker/web/web_start_wrapper.sh
Daniel Markstedt a99e1c51b9 Move the protobuf source into its own dir in the repo root
The protobuf source file is used by more than just the C++ code,
so let's move it into its own location for consistency and discoverability
2025-12-03 23:20:46 +01:00

23 lines
637 B
Bash

#!/usr/bin/env bash
if ! [[ -f "/home/pi/piscsi/python/common/src/piscsi_interface_pb2.py" ]]; then
# Build piscsi_interface_pb2.py with the protobuf compiler
protoc \
--python_out=/home/pi/piscsi/python/common/src \
--proto_path=/home/pi/piscsi/proto \
/home/pi/piscsi/proto/piscsi_interface.proto
fi
# Start Nginx service
nginx
# Use mock commands
export PATH="/home/pi/piscsi/python/web/mock/bin:$PATH"
# Pass args to web UI start script
if [[ $BACKEND_PASSWORD ]]; then
/home/pi/piscsi/python/web/start.sh "$@" --password=$BACKEND_PASSWORD
else
/home/pi/piscsi/python/web/start.sh "$@"
fi