瀏覽代碼

Exclude comments

Bob Mottram 8 年之前
父節點
當前提交
6e6f2a19b6
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. 3
    2
      src/freedombone-sec

+ 3
- 2
src/freedombone-sec 查看文件

752
 }
752
 }
753
 
753
 
754
 function show_tor_bridges {
754
 function show_tor_bridges {
755
-    if ! grep "Bridge " /etc/tor/torrc; then
755
+    bridges_list=$(grep "Bridge " /etc/tor/torrc | grep -v '##')
756
+    if [ ${#bridges_list} -eq 0 ]; then
756
         echo $'No Tor bridges have been added'
757
         echo $'No Tor bridges have been added'
757
         return
758
         return
758
     fi
759
     fi
759
     clear
760
     clear
760
-    grep "Bridge " /etc/tor/torrc
761
+    echo "${bridges_list}"
761
 }
762
 }
762
 
763
 
763
 function add_tor_bridge {
764
 function add_tor_bridge {