This commit is contained in:
Bob Mottram 2017-06-10 16:11:30 +01:00
parent c57aec4356
commit aa81bb930e
1 changed files with 1 additions and 1 deletions

View File

@ -600,7 +600,7 @@ function create_tahoelafs_web {
if [ ! -f /etc/nginx/.htpasswd-tahoelafs ]; then
touch /etc/nginx/.htpasswd-tahoelafs
fi
if grep "${MY_USERNAME}:" /etc/nginx/.htpasswd-tahoelafs; then
if grep -q "${MY_USERNAME}:" /etc/nginx/.htpasswd-tahoelafs; then
sed -i '/${MY_USERNAME}:/d' /etc/nginx/.htpasswd-tahoelafs
fi
echo "${TAHOELAFS_ADMIN_PASSWORD}" | htpasswd -i -s /etc/nginx/.htpasswd-tahoelafs ${MY_USERNAME}