Bob Mottram 7 年前
父节点
当前提交
aa81bb930e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/freedombone-app-tahoelafs

+ 1
- 1
src/freedombone-app-tahoelafs 查看文件

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