From 393352d7ef492d32c9b47b779271aedc440c1cb7 Mon Sep 17 00:00:00 2001 From: Bogdan Grosu Date: Fri, 1 Mar 2024 12:33:13 +0000 Subject: [PATCH] fix(iptvboss): fixing cronitor --- Dockerfile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index f2475fa..5e16f99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,24 +42,19 @@ RUN wget "https://github.com/walrusone/iptvboss-release/releases/latest/download ENV PATH="/usr/lib/iptvboss/bin:${PATH}" -# Configure cronitor if enabled and API key is provided -ARG CRONITOR_ENABLE=false -ARG CRONITOR_API_KEY="" -RUN if [ "$CRONITOR_ENABLE" = "true" ] && [ -n "$CRONITOR_API_KEY" ]; then \ - echo "{ \"CRONITOR_API_KEY\": \"$CRONITOR_API_KEY\" }" > /etc/cronitor/cronitor.json && \ - cronitor discover --auto; \ -fi - # Switch back to the non-root user USER 1000 # Apply cron job RUN crontab /var/spool/crontab/iptvboss/iptvboss-cron -#Configure cronitor +# Configure cronitor if enabled and API key is provided ARG CRONITOR_ENABLE=false -RUN if [ "$CRONITOR_ENABLE" = "true" ]; then \ - cronitor discover; \ +ARG CRONITOR_API_KEY="" + +RUN if [ "$CRONITOR_ENABLE" = "true" ] && [ -n "$CRONITOR_API_KEY" ]; then \ + echo "{ \"CRONITOR_API_KEY\": \"$CRONITOR_API_KEY\" }" > /etc/cronitor/cronitor.json && \ + cronitor discover --auto; \ fi # Expose VNC port