phase 2
This commit is contained in:
15
media/ctrl/server.sh
Executable file
15
media/ctrl/server.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Build and run the media server (receiver).
|
||||
# Run this on mcrndeb directly.
|
||||
# Usage: ./server.sh [port]
|
||||
set -euo pipefail
|
||||
|
||||
MEDIA_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
CARGO="${CARGO:-$HOME/.cargo/bin/cargo}"
|
||||
|
||||
LOG_DIR="$MEDIA_DIR/logs"
|
||||
mkdir -p "$LOG_DIR"
|
||||
"$CARGO" build -p cht-server --manifest-path "$MEDIA_DIR/Cargo.toml" 2>&1 | tee "$LOG_DIR/build-server.log"
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ]; then exit 1; fi
|
||||
|
||||
exec "$MEDIA_DIR/target/debug/cht-server" "$@"
|
||||
Reference in New Issue
Block a user