mirror of
https://github.com/adferrand/docker-backuppc.git
synced 2023-11-05 04:40:26 +01:00
Refactor log handling
This commit is contained in:
parent
586b0d01e5
commit
2fad465e51
@ -90,11 +90,13 @@ if [ -f /firstrun ]; then
|
||||
|
||||
# Configure standard mail delivery parameters (may be overriden by backuppc user-wide config)
|
||||
echo "account default" > /etc/msmtprc
|
||||
echo "logfile /var/log/msmtp.log" >> /etc/msmtprc
|
||||
echo "host ${SMTP_HOST:-mail.example.org}" >> /etc/msmtprc
|
||||
echo "auto_from on" >> /etc/msmtprc
|
||||
if [ "${SMTP_MAIL_DOMAIN:-}" != "" ]; then
|
||||
echo "maildomain ${SMTP_MAIL_DOMAIN}" >> /etc/msmtprc
|
||||
echo "from %U@${SMTP_MAIL_DOMAIN}" >> /etc/msmtprc
|
||||
fi
|
||||
touch /var/log/msmtp.log
|
||||
chown "${BACKUPPC_USERNAME}:${BACKUPPC_GROUPNAME}" /var/log/msmtp.log
|
||||
|
||||
# Clean
|
||||
rm -rf /root/BackupPC-$BACKUPPC_VERSION.tar.gz /root/BackupPC-$BACKUPPC_VERSION /firstrun
|
||||
|
@ -36,3 +36,9 @@ redirect_stderr = true
|
||||
stdout_logfile = /dev/stdout
|
||||
stdout_logfile_maxbytes = 0
|
||||
user = %(ENV_BACKUPPC_USERNAME)s
|
||||
|
||||
[program:watchmails]
|
||||
command = tail -f /var/log/msmtp.log
|
||||
redirect_stderr = true
|
||||
stdout_logfile = /dev/stdout
|
||||
stdout_logfile_maxbytes = 0
|
||||
|
Loading…
Reference in New Issue
Block a user