From aecc22c1d90b19f6ed47a02227c08b34287f1344 Mon Sep 17 00:00:00 2001 From: Brandon McFarlin <6525520+Brandawg93@users.noreply.github.com> Date: Wed, 10 Aug 2022 20:33:31 -0400 Subject: [PATCH 1/3] check if files exist --- src/docker-entrypoint | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/docker-entrypoint b/src/docker-entrypoint index 2365511..7d3742e 100755 --- a/src/docker-entrypoint +++ b/src/docker-entrypoint @@ -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 < Date: Wed, 10 Aug 2022 21:04:23 -0400 Subject: [PATCH 2/3] add curl --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d3dd796..d568a3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,7 @@ RUN set -ex; \ apk add --no-cache --virtual .build-deps \ libusb-compat-dev \ build-base \ + curl \ ; \ # download and extract cd /tmp; \ From 4968a7d3869ecbfd519f317705c7a2412df2b689 Mon Sep 17 00:00:00 2001 From: Brandon <--global> Date: Sun, 27 Aug 2023 02:10:30 +0000 Subject: [PATCH 3/3] update nut --- Dockerfile | 8 ++++---- src/docker-entrypoint | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d568a3f..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" @@ -28,7 +28,7 @@ RUN set -ex; \ ; \ # 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 7d3742e..1f0e5b5 100755 --- a/src/docker-entrypoint +++ b/src/docker-entrypoint @@ -1,4 +1,4 @@ -#!/bin/sh -ex +#!/bin/sh if [ -z "$API_PASSWORD" ] then