From abb1b05519a464564efdec2e700a3d7ca9e5d73e Mon Sep 17 00:00:00 2001 From: Christoph Roeder Date: Thu, 8 Jun 2017 13:20:45 +0200 Subject: [PATCH] do not overwrite existing htpasswd --- files/entrypoint.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/files/entrypoint.sh b/files/entrypoint.sh index ebc2c82..049b205 100755 --- a/files/entrypoint.sh +++ b/files/entrypoint.sh @@ -33,7 +33,9 @@ if [ -f /firstrun ]; then --config-override CgiAdminUsers="'${BACKUPPC_WEB_USER:-backuppc}'" # Configure WEB UI access - htpasswd -b -c /etc/backuppc/htpasswd ${BACKUPPC_WEB_USER:-backuppc} ${BACKUPPC_WEB_PASSWD:-password} + if [ ! -f /etc/backuppc/htpasswd ]; then + htpasswd -b -c /etc/backuppc/htpasswd ${BACKUPPC_WEB_USER:-backuppc} ${BACKUPPC_WEB_PASSWD:-password} + fi # Prepare lighttpd if [ "$USE_SSL" = true ]; then @@ -59,8 +61,8 @@ if [ -f /firstrun ]; then 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 - fi + echo "maildomain ${SMTP_MAIL_DOMAIN}" >> /etc/msmtprc + fi # Clean rm -rf /root/BackupPC-$BACKUPPC_VERSION.tar.gz /root/BackupPC-$BACKUPPC_VERSION /firstrun