Skip to content

Commit a018fdc

Browse files
committed
Fix mailx setup for latest restic image that is based on latest alpine
- mailx is known as mail in alpine
1 parent 1d222b9 commit a018fdc

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Dockerfile

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN unzip rclone-current-linux-amd64.zip && mv rclone-*-linux-amd64/rclone /bin/
66

77
FROM restic/restic:0.16.0
88

9-
RUN apk add --update --no-cache heirloom-mailx fuse curl
9+
RUN apk add --update --no-cache curl mailx
1010

1111
COPY --from=rclone /bin/rclone /bin/rclone
1212

@@ -54,8 +54,5 @@ COPY backup.sh /bin/backup
5454
COPY check.sh /bin/check
5555
COPY entry.sh /entry.sh
5656

57-
58-
WORKDIR "/"
59-
6057
ENTRYPOINT ["/entry.sh"]
6158
CMD ["tail","-fn0","/var/log/cron.log"]

backup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [ -n "${TEAMS_WEBHOOK_URL}" ]; then
7272
fi
7373

7474
if [ -n "${MAILX_ARGS}" ]; then
75-
sh -c "mailx -v -S sendwait ${MAILX_ARGS} < ${lastLogfile} > ${lastMailLogfile} 2>&1"
75+
sh -c "mail -v -S sendwait ${MAILX_ARGS} < ${lastLogfile} > ${lastMailLogfile} 2>&1"
7676
if [ $? == 0 ]; then
7777
echo "Mail notification successfully sent."
7878
else

check.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ if [ -n "${TEAMS_WEBHOOK_URL}" ]; then
6060
fi
6161

6262
if [ -n "${MAILX_ARGS}" ]; then
63-
sh -c "mailx -v -S sendwait ${MAILX_ARGS} < ${lastLogfile} > ${lastMailLogfile} 2>&1"
63+
sh -c "mail -v -S sendwait ${MAILX_ARGS} < ${lastLogfile} > ${lastMailLogfile} 2>&1"
6464
if [ $? == 0 ]; then
6565
echo "Mail notification successfully sent."
6666
else

0 commit comments

Comments
 (0)