Adds restarts support to docker container
This commit is contained in:
@@ -16,4 +16,7 @@ RUN if [ "${BUILD_ARCH}" = "aarch64" ]; then BUILD_ARCH="arm64"; \
|
|||||||
&& curl $(curl -s "https://raw.githubusercontent.com/ngrok/docker-ngrok/main/releases.json" | jq -r ".${BUILD_ARCH}.url") -o ngrok.zip \
|
&& curl $(curl -s "https://raw.githubusercontent.com/ngrok/docker-ngrok/main/releases.json" | jq -r ".${BUILD_ARCH}.url") -o ngrok.zip \
|
||||||
&& unzip ngrok
|
&& unzip ngrok
|
||||||
|
|
||||||
CMD [ "/app/go2rtc", "-config", "/config/go2rtc.yaml" ]
|
COPY run.sh /
|
||||||
|
RUN chmod a+x /run.sh
|
||||||
|
|
||||||
|
CMD [ "/run.sh" ]
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
|
set +e
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
if [ -x /config/go2rtc ]; then
|
||||||
|
/config/go2rtc -config /config/go2rtc.yaml
|
||||||
|
else
|
||||||
|
/app/go2rtc -config /config/go2rtc.yaml
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user