Remove any existing vpn client keys when resetting mesh identity

This commit is contained in:
Bob Mottram 2017-10-28 10:03:26 +01:00
parent 76fc3d2148
commit d7936967df
1 changed files with 12 additions and 1 deletions

View File

@ -885,11 +885,22 @@ if [ -f $MESH_INSTALL_SETUP ]; then
rm -rf /home/$MY_USERNAME/.ssb
fi
# Remove vpn keys
# Remove vpn host keys
if [ -d /etc/openvpn/easy-rsa/keys ]; then
rm -rf /etc/openvpn/easy-rsa/keys/*
fi
# Remove any existing vpn client keys
if [ -f /home/$MY_USERNAME/vpn.tar.gz ]; then
rm /home/$MY_USERNAME/vpn.tar.gz
fi
if [ -f /home/$USERNAME/stunnel.pem ]; then
rm /home/$USERNAME/stunnel.pem
fi
if [ -f /home/$USERNAME/stunnel.p12 ]; then
rm /home/$USERNAME/stunnel.p12
fi
# Remove cryptpad datastore
if [ -d $CRYPTPAD_DIR/datastore ]; then
rm -rf $CRYPTPAD_DIR/datastore