Fix mailx setup for latest restic image that is based on latest alpine

- mailx is known as mail in alpine
This commit is contained in:
Tobias Kaupat
2023-08-05 23:54:01 +02:00
parent 1d222b9798
commit a018fdc2ec
3 changed files with 3 additions and 6 deletions

View File

@@ -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"]

View File

@@ -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

View File

@@ -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