Avoid repeating x11vnc and Xvfb starts

https://github.com/alexbelgium/hassio-addons/issues/747#issuecomment-1603242249
This commit is contained in:
Alexandre
2023-06-28 19:44:16 +02:00
committed by GitHub
parent 04da42dc1a
commit 5f70696781

View File

@@ -71,6 +71,8 @@ RUN \
sed -i "s|/fgc|/data|g" /usr/local/bin/docker-entrypoint.sh && \
# Run scripts only once
sed -i "1a if [ -f /done ]; then exit 0; fi && touch /done" /entrypoint.sh && \
sed -i "s=Xvfb=[[ \"\$(ps aux | grep \"Xvfb\" | grep -v grep)\" ]] || x11vnc=g" /usr/local/bin/docker-entrypoint.sh && \
sed -i "s=x11vnc=[[ \"\$(ps aux | grep \"x11vnc\" | grep -v grep)\" ]] || x11vnc=g" /usr/local/bin/docker-entrypoint.sh && \
# Allow entrypoint
chmod 777 /entrypoint.sh