diff --git a/CHANGELOG.md b/CHANGELOG.md index 7795e24..67daddd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## master - CURRENT +### Added +* The system configuration file `/etc/msmtprc` for `msmtprc` is not overwritten + if it already exists at container initialization. + ## 4.4.0-3 - 06/11/2020 ### Modified * Update base image to Alpine 3.12.1 diff --git a/files/entrypoint.sh b/files/entrypoint.sh index 446997e..997052e 100755 --- a/files/entrypoint.sh +++ b/files/entrypoint.sh @@ -106,14 +106,16 @@ if [ -f /firstrun ]; then touch /var/log/lighttpd/error.log && chown -R "$BACKUPPC_USERNAME":"$BACKUPPC_GROUPNAME" /var/log/lighttpd # 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 - if [ "${SMTP_MAIL_DOMAIN:-}" != "" ]; then - echo "from %U@${SMTP_MAIL_DOMAIN}" >> /etc/msmtprc + if [ ! -f /etc/msmtprc ]; then + echo "account default" > /etc/msmtprc + echo "logfile /var/log/msmtp.log" >> /etc/msmtprc + echo "host ${SMTP_HOST:-mail.example.org}" >> /etc/msmtprc + if [ "${SMTP_MAIL_DOMAIN:-}" != "" ]; then + echo "from %U@${SMTP_MAIL_DOMAIN}" >> /etc/msmtprc + fi + touch /var/log/msmtp.log + chown "${BACKUPPC_USERNAME}:${BACKUPPC_GROUPNAME}" /var/log/msmtp.log 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 diff --git a/utils/create_release.py b/utils/create_release.py index 037b65a..26997e0 100755 --- a/utils/create_release.py +++ b/utils/create_release.py @@ -38,6 +38,7 @@ def main(): "## master - CURRENT\n", """\ ## master - CURRENT + ## {0} - {1} """.format( new_version, today.strftime("%d/%m/%Y")