fix: add entrypoint script - wait for auth before starting RTSP server
This commit is contained in:
+2
-2
@@ -8,7 +8,7 @@ FROM alpine:3.19
|
|||||||
RUN apk add --no-cache ca-certificates tzdata
|
RUN apk add --no-cache ca-certificates tzdata
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/tuya-ipc-terminal .
|
COPY --from=builder /app/tuya-ipc-terminal .
|
||||||
|
COPY entrypoint.sh .
|
||||||
VOLUME ["/app/.tuya-data"]
|
VOLUME ["/app/.tuya-data"]
|
||||||
EXPOSE 8554
|
EXPOSE 8554
|
||||||
ENTRYPOINT ["./tuya-ipc-terminal"]
|
ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
|
||||||
CMD ["rtsp", "start", "--port", "8554"]
|
|
||||||
|
|||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "=== tuya-ipc-terminal RTSP Bridge ==="
|
||||||
|
|
||||||
|
# Vérifier si des users sont authentifiés
|
||||||
|
if ./tuya-ipc-terminal auth list 2>/dev/null | grep -q '@'; then
|
||||||
|
echo "Auth trouvée, démarrage du serveur RTSP..."
|
||||||
|
exec ./tuya-ipc-terminal rtsp start --port 8554
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "⚠️ Aucun compte authentifié."
|
||||||
|
echo ""
|
||||||
|
echo "Pour configurer, lance depuis le QNAP :"
|
||||||
|
echo " docker exec -it tuya-ipc ./tuya-ipc-terminal auth add eu-central TON_EMAIL --password"
|
||||||
|
echo ""
|
||||||
|
echo "Container en attente (sleep infini)..."
|
||||||
|
exec sleep infinity
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user