ソースを参照

Install once only

Bob Mottram 9 年 前
コミット
259dbe47b5
共有1 個のファイルを変更した8 個の追加0 個の削除を含む
  1. 8
    0
      src/freedombone

+ 8
- 0
src/freedombone ファイルの表示

3524
     if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
3524
     if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
3525
         return
3525
         return
3526
     fi
3526
     fi
3527
+    if grep -Fxq "install_tor" $COMPLETION_FILE; then
3528
+        return
3529
+    fi
3527
     apt-get -y install tor
3530
     apt-get -y install tor
3531
+    echo 'install_tor' >> $COMPLETION_FILE
3528
 }
3532
 }
3529
 
3533
 
3530
 function enable_ssh_via_onion {
3534
 function enable_ssh_via_onion {
3531
     if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
3535
     if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
3532
         return
3536
         return
3533
     fi
3537
     fi
3538
+    if grep -Fxq "enable_ssh_via_onion" $COMPLETION_FILE; then
3539
+        return
3540
+    fi
3534
     apt-get -y install tor connect-proxy
3541
     apt-get -y install tor connect-proxy
3535
     if ! grep -q 'Host *.onion' /home/$MY_USERNAME/.ssh/config; then
3542
     if ! grep -q 'Host *.onion' /home/$MY_USERNAME/.ssh/config; then
3536
         if [ ! -d /home/$MY_USERNAME/.ssh ]; then
3543
         if [ ! -d /home/$MY_USERNAME/.ssh ]; then
3548
         echo 'Host *.onion' >> /root/.ssh/config
3555
         echo 'Host *.onion' >> /root/.ssh/config
3549
         echo 'ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p' >> /root/.ssh/config
3556
         echo 'ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p' >> /root/.ssh/config
3550
     fi
3557
     fi
3558
+    echo 'enable_ssh_via_onion' >> $COMPLETION_FILE
3551
 }
3559
 }
3552
 
3560
 
3553
 function install_editor {
3561
 function install_editor {