From d65d619fff15eca68babb44aab8fa6badb300824 Mon Sep 17 00:00:00 2001 From: Konstantin Dmitriev Date: Tue, 29 Jan 2019 12:13:32 +0700 Subject: [PATCH 1/3] Workaround bug which causes BackupPC fail to start when container launched with existing configuration --- files/entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/entrypoint.sh b/files/entrypoint.sh index 13e0ab3..53f253c 100755 --- a/files/entrypoint.sh +++ b/files/entrypoint.sh @@ -34,6 +34,9 @@ if [ -f /firstrun ]; then # Configure WEB UI access 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 fail to start when container launched with existing configuration + sed -ie "s|^\$Conf{CgiURL}\s*=\s*''http://localhost/cgi-bin/BackupPC/BackupPC_Admin''|\$Conf{CgiURL} = 'http://localhost/cgi-bin/BackupPC/BackupPC_Admin'|g" /etc/backuppc/config.pl # Prepare lighttpd if [ "$USE_SSL" = true ]; then From eeb91365237a6f0a888ad18c8eb0456f284c663d Mon Sep 17 00:00:00 2001 From: Konstantin Dmitriev Date: Tue, 29 Jan 2019 20:43:19 +0700 Subject: [PATCH 2/3] Do not hardcode CgiURL value --- files/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/entrypoint.sh b/files/entrypoint.sh index 53f253c..438e169 100755 --- a/files/entrypoint.sh +++ b/files/entrypoint.sh @@ -36,7 +36,7 @@ if [ -f /firstrun ]; then htpasswd -b -c /etc/backuppc/htpasswd ${BACKUPPC_WEB_USER:-backuppc} ${BACKUPPC_WEB_PASSWD:-password} # Workaround bug which causes BackupPC fail to start when container launched with existing configuration - sed -ie "s|^\$Conf{CgiURL}\s*=\s*''http://localhost/cgi-bin/BackupPC/BackupPC_Admin''|\$Conf{CgiURL} = 'http://localhost/cgi-bin/BackupPC/BackupPC_Admin'|g" /etc/backuppc/config.pl + sed -ie "s|^\$Conf{CgiURL}\s*=\s*''\(.*\)''|\$Conf{CgiURL} = '\1'|g" /etc/backuppc/config.pl # Prepare lighttpd if [ "$USE_SSL" = true ]; then From 671b7d8212b1282293eddce87fba416f01f36f4e Mon Sep 17 00:00:00 2001 From: Konstantin Dmitriev Date: Tue, 29 Jan 2019 20:44:15 +0700 Subject: [PATCH 3/3] Give more detailed info about the issue --- files/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/entrypoint.sh b/files/entrypoint.sh index 438e169..2a078c9 100755 --- a/files/entrypoint.sh +++ b/files/entrypoint.sh @@ -35,7 +35,8 @@ 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 fail to start when container launched with existing configuration + # 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