mirror of
https://github.com/akuker/RASCSI.git
synced 2026-01-23 12:16:06 +00:00
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
23 lines
637 B
Bash
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
|