Merge pull request #18 from morevnaproject/morevnaproject-patch-start-fail

Workaround bug which causes BackupPC fail to start when container launched with existing configuration
This commit is contained in:
Adrien Ferrand 2019-01-29 15:40:23 +01:00 committed by GitHub
commit 4131bb6344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,10 @@ if [ -f /firstrun ]; then
sed -ie "s/^\$Conf{CgiAdminUsers}\s*=\s*'\w*'/\$Conf{CgiAdminUsers} = '${BACKUPPC_WEB_USER:-backuppc}'/g" /etc/backuppc/config.pl
htpasswd -b -c /etc/backuppc/htpasswd ${BACKUPPC_WEB_USER:-backuppc} ${BACKUPPC_WEB_PASSWD:-password}
# Workaround bug which causes BackupPC v3 fail to start when container launched with existing configuration.
# See https://github.com/adferrand/docker-backuppc/pull/18 for details.
sed -ie "s|^\$Conf{CgiURL}\s*=\s*''\(.*\)''|\$Conf{CgiURL} = '\1'|g" /etc/backuppc/config.pl
# Prepare lighttpd
if [ "$USE_SSL" = true ]; then
# Generate certificate file as needed