diff --git a/Dockerfile b/Dockerfile index d3dd796..79e9d1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM alpine:3.12 +FROM alpine:3.18 -LABEL maintainer="docker@upshift.fr" +LABEL maintainer="bandawg93" -ENV NUT_VERSION 2.7.4 +ENV NUT_VERSION 2.8.0 ENV UPS_NAME="ups" ENV UPS_DESC="UPS" @@ -24,10 +24,11 @@ RUN set -ex; \ apk add --no-cache --virtual .build-deps \ libusb-compat-dev \ build-base \ + curl \ ; \ # download and extract cd /tmp; \ - wget http://www.networkupstools.org/source/2.7/nut-$NUT_VERSION.tar.gz; \ + wget http://www.networkupstools.org/source/2.8/nut-$NUT_VERSION.tar.gz; \ tar xfz nut-$NUT_VERSION.tar.gz; \ cd nut-$NUT_VERSION \ ; \ diff --git a/src/docker-entrypoint b/src/docker-entrypoint index 2365511..1f0e5b5 100755 --- a/src/docker-entrypoint +++ b/src/docker-entrypoint @@ -1,4 +1,4 @@ -#!/bin/sh -ex +#!/bin/sh if [ -z "$API_PASSWORD" ] then @@ -10,17 +10,25 @@ then ADMIN_PASSWORD=$(dd if=/dev/urandom bs=18 count=1 2>/dev/null | base64) fi +if [ ! -f /etc/nut/ups.conf ] +then cat >/etc/nut/ups.conf </etc/nut/upsd.conf </etc/nut/upsd.users </etc/nut/upsd.users </etc/nut/upsmon.conf <