From a018fdc2ec6dc2cbcba86a2edd2cd7721e3ff1d1 Mon Sep 17 00:00:00 2001 From: Tobias Kaupat Date: Sat, 5 Aug 2023 23:54:01 +0200 Subject: [PATCH] Fix mailx setup for latest restic image that is based on latest alpine - mailx is known as mail in alpine --- Dockerfile | 5 +---- backup.sh | 2 +- check.sh | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a15adf2..9cf220b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN unzip rclone-current-linux-amd64.zip && mv rclone-*-linux-amd64/rclone /bin/ FROM restic/restic:0.16.0 -RUN apk add --update --no-cache heirloom-mailx fuse curl +RUN apk add --update --no-cache curl mailx COPY --from=rclone /bin/rclone /bin/rclone @@ -54,8 +54,5 @@ COPY backup.sh /bin/backup COPY check.sh /bin/check COPY entry.sh /entry.sh - -WORKDIR "/" - ENTRYPOINT ["/entry.sh"] CMD ["tail","-fn0","/var/log/cron.log"] diff --git a/backup.sh b/backup.sh index 5eaf4a8..6391ebc 100755 --- a/backup.sh +++ b/backup.sh @@ -72,7 +72,7 @@ if [ -n "${TEAMS_WEBHOOK_URL}" ]; then fi if [ -n "${MAILX_ARGS}" ]; then - sh -c "mailx -v -S sendwait ${MAILX_ARGS} < ${lastLogfile} > ${lastMailLogfile} 2>&1" + sh -c "mail -v -S sendwait ${MAILX_ARGS} < ${lastLogfile} > ${lastMailLogfile} 2>&1" if [ $? == 0 ]; then echo "Mail notification successfully sent." else diff --git a/check.sh b/check.sh index c33c168..56d18d7 100755 --- a/check.sh +++ b/check.sh @@ -60,7 +60,7 @@ if [ -n "${TEAMS_WEBHOOK_URL}" ]; then fi if [ -n "${MAILX_ARGS}" ]; then - sh -c "mailx -v -S sendwait ${MAILX_ARGS} < ${lastLogfile} > ${lastMailLogfile} 2>&1" + sh -c "mail -v -S sendwait ${MAILX_ARGS} < ${lastLogfile} > ${lastMailLogfile} 2>&1" if [ $? == 0 ]; then echo "Mail notification successfully sent." else