diff --git a/Dockerfile b/Dockerfile index 68b64f0..f653116 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG DIST="xenial" FROM ubuntu:${DIST} ARG DIST -ARG UNIFI_VERSION="7.2.92-18687-1" +ARG UNIFI_VERSION="7.2.94-18697-1" ARG MONGODB_VERSION="3.4" RUN apt-get update && \ @@ -24,7 +24,7 @@ RUN apt-get update && \ VOLUME /config COPY root / -RUN chmod +x /app/entrypoint.sh /app/unifi/certbot.sh +RUN chmod +x /app/entrypoint.sh WORKDIR /home/unifi diff --git a/root/app/entrypoint.sh b/root/app/entrypoint.sh index 10f02a1..4749e3e 100644 --- a/root/app/entrypoint.sh +++ b/root/app/entrypoint.sh @@ -9,7 +9,6 @@ mkdir -p \ /var/log/{supervisord,unifi} chown -R unifi:unifi \ - /app/unifi/certbot.sh \ /config/{lib,run} \ /etc/ssl/certs \ /home/unifi \ @@ -32,6 +31,17 @@ do ln -s /config/$f /var/$f/unifi done +# Update certificates +# +/usr/sbin/update-ca-certificates -f > /dev/null 2>&1 + +if [ $? -eq 0 ] +then + echo "$(date) [INF] Certificates updated." +else + echo "$(date) [ERR] Failed to update certificates." +fi + # Start supervisor # exec /usr/bin/supervisord -c /app/unifi/supervisord.conf \ No newline at end of file diff --git a/root/app/unifi/certbot.sh b/root/app/unifi/certbot.sh deleted file mode 100644 index 5a9f6f3..0000000 --- a/root/app/unifi/certbot.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Update certificates -# -/usr/sbin/update-ca-certificates -f > /dev/null 2>&1 - -if [ $? -eq 0 ] -then - echo "$(date) [INF] Certificates updated." -else - echo "$(date) [ERR] Failed to update certificates." -fi - -# Sleep 24h before next update -# -exec sleep 86400 diff --git a/root/app/unifi/supervisord.conf b/root/app/unifi/supervisord.conf index 269ffb8..4c2405a 100644 --- a/root/app/unifi/supervisord.conf +++ b/root/app/unifi/supervisord.conf @@ -17,13 +17,3 @@ logfile_maxbytes = 50MB logfile = /var/log/supervisord/unifi.log pidfile = /run/supervisord/unifi.pid user = unifi - -[program:certbot] -command = /app/unifi/certbot.sh -autorestart = true -priority = 1 -startsecs = 1 -stdout_logfile = /var/log/supervisord/certbot.log -logfile_maxbytes = 5MB -pidfile = /run/supervisord/certbot.pid -user = unifi