mirror of
https://github.com/adferrand/docker-backuppc.git
synced 2023-11-05 04:40:26 +01:00
keep htpasswd if no env vars given and create a new one when not exist
This commit is contained in:
parent
abb1b05519
commit
7b994d5fef
@ -34,7 +34,11 @@ if [ -f /firstrun ]; then
|
|||||||
|
|
||||||
# Configure WEB UI access
|
# Configure WEB UI access
|
||||||
if [ ! -f /etc/backuppc/htpasswd ]; then
|
if [ ! -f /etc/backuppc/htpasswd ]; then
|
||||||
htpasswd -b -c /etc/backuppc/htpasswd ${BACKUPPC_WEB_USER:-backuppc} ${BACKUPPC_WEB_PASSWD:-password}
|
htpasswd -b -c /etc/backuppc/htpasswd "${BACKUPPC_WEB_USER:-backuppc}" "${BACKUPPC_WEB_PASSWD:-password}"
|
||||||
|
|
||||||
|
elif [ -n "$BACKUPPC_WEB_USER" -a -n "$BACKUPPC_WEB_PASSWD" ]; then
|
||||||
|
touch /etc/backuppc/htpasswd
|
||||||
|
htpasswd -b /etc/backuppc/htpasswd "${BACKUPPC_WEB_USER}" "${BACKUPPC_WEB_PASSWD}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare lighttpd
|
# Prepare lighttpd
|
||||||
|
Loading…
Reference in New Issue
Block a user