瀏覽代碼

Simplify tor-wifi installation

Bob Mottram 10 年之前
父節點
當前提交
e1a86ee203
共有 1 個檔案被更改,包括 16 行新增3 行删除
  1. 16
    3
      install-freedombone.sh

+ 16
- 3
install-freedombone.sh 查看文件

386
       exit 2
386
       exit 2
387
   fi
387
   fi
388
   if [ ! $MY_USERNAME ]; then
388
   if [ ! $MY_USERNAME ]; then
389
-      show_help
390
-      exit 3
389
+      if [[ $DOMAIN_NAME == "tor-wifi" || $DOMAIN_NAME == "torwifi" || $DOMAIN_NAME == "tor-hotspot" || $DOMAIN_NAME == "torhotspot"  || $DOMAIN_NAME == "tor-access-point" || $DOMAIN_NAME == "tor" || $DOMAIN_NAME == "tor-dongle" || $DOMAIN_NAME == "tordongle" ]]; then
390
+          if [ -d /home/tor ]; then
391
+              $MY_USERNAME="tor"
392
+          fi
393
+          if [ -d /home/toruser ]; then
394
+              $MY_USERNAME="toruser"
395
+          fi
396
+          if [ ! $MY_USERNAME ]; then
397
+              show_help
398
+              exit 3
399
+          fi
400
+      else
401
+          show_help
402
+          exit 3
403
+      fi
391
   fi
404
   fi
392
   if [ ! $FREEDNS_SUBDOMAIN_CODE ]; then
405
   if [ ! $FREEDNS_SUBDOMAIN_CODE ]; then
393
-      if [[ $DOMAIN_NAME == "tor-wifi" || $DOMAIN_NAME == "torwifi" ]]; then
406
+      if [[ $DOMAIN_NAME == "tor-wifi" || $DOMAIN_NAME == "torwifi" || $DOMAIN_NAME == "tor-hotspot" || $DOMAIN_NAME == "torhotspot"  || $DOMAIN_NAME == "tor-access-point"]]; then
394
           DOMAIN_NAME="tor-wifi"
407
           DOMAIN_NAME="tor-wifi"
395
           SYSTEM_TYPE=$VARIANT_TOR_WIFI
408
           SYSTEM_TYPE=$VARIANT_TOR_WIFI
396
           ROUTE_THROUGH_TOR="yes"
409
           ROUTE_THROUGH_TOR="yes"