mirror of
https://github.com/lobaro/restic-backup-docker.git
synced 2026-02-17 09:23:56 +00:00
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:
@@ -6,7 +6,7 @@ RUN unzip rclone-current-linux-amd64.zip && mv rclone-*-linux-amd64/rclone /bin/
|
|||||||
|
|
||||||
FROM restic/restic:0.16.0
|
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
|
COPY --from=rclone /bin/rclone /bin/rclone
|
||||||
|
|
||||||
@@ -54,8 +54,5 @@ COPY backup.sh /bin/backup
|
|||||||
COPY check.sh /bin/check
|
COPY check.sh /bin/check
|
||||||
COPY entry.sh /entry.sh
|
COPY entry.sh /entry.sh
|
||||||
|
|
||||||
|
|
||||||
WORKDIR "/"
|
|
||||||
|
|
||||||
ENTRYPOINT ["/entry.sh"]
|
ENTRYPOINT ["/entry.sh"]
|
||||||
CMD ["tail","-fn0","/var/log/cron.log"]
|
CMD ["tail","-fn0","/var/log/cron.log"]
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ if [ -n "${TEAMS_WEBHOOK_URL}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${MAILX_ARGS}" ]; then
|
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
|
if [ $? == 0 ]; then
|
||||||
echo "Mail notification successfully sent."
|
echo "Mail notification successfully sent."
|
||||||
else
|
else
|
||||||
|
|||||||
2
check.sh
2
check.sh
@@ -60,7 +60,7 @@ if [ -n "${TEAMS_WEBHOOK_URL}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${MAILX_ARGS}" ]; then
|
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
|
if [ $? == 0 ]; then
|
||||||
echo "Mail notification successfully sent."
|
echo "Mail notification successfully sent."
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user