瀏覽代碼

Remove any existing vpn client keys when resetting mesh identity

Bob Mottram 7 年之前
父節點
當前提交
d7936967df
共有 1 個文件被更改,包括 12 次插入1 次删除
  1. 12
    1
      src/freedombone-image-mesh

+ 12
- 1
src/freedombone-image-mesh 查看文件

@@ -885,11 +885,22 @@ if [ -f $MESH_INSTALL_SETUP ]; then
885 885
         rm -rf /home/$MY_USERNAME/.ssb
886 886
     fi
887 887
 
888
-    # Remove vpn keys
888
+    # Remove vpn host keys
889 889
     if [ -d /etc/openvpn/easy-rsa/keys ]; then
890 890
         rm -rf /etc/openvpn/easy-rsa/keys/*
891 891
     fi
892 892
 
893
+    # Remove any existing vpn client keys
894
+    if [ -f /home/$MY_USERNAME/vpn.tar.gz ]; then
895
+        rm /home/$MY_USERNAME/vpn.tar.gz
896
+    fi
897
+    if [ -f /home/$USERNAME/stunnel.pem ]; then
898
+        rm /home/$USERNAME/stunnel.pem
899
+    fi
900
+    if [ -f /home/$USERNAME/stunnel.p12 ]; then
901
+        rm /home/$USERNAME/stunnel.p12
902
+    fi
903
+
893 904
     # Remove cryptpad datastore
894 905
     if [ -d $CRYPTPAD_DIR/datastore ]; then
895 906
         rm -rf $CRYPTPAD_DIR/datastore