Browse Source

Check vpn client template exists

Bob Mottram 7 years ago
parent
commit
54bc008961
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/freedombone-app-vpn

+ 5
- 0
src/freedombone-app-vpn View File

@@ -123,6 +123,11 @@ y
123 123
 
124 124
     user_vpn_cert_file=/home/$username/$OPENVPN_KEY_FILENAME
125 125
 
126
+    if [ ! -f /usr/share/doc/openvpn/examples/sample-config-files/client.conf ]; then
127
+        echo $'No VPN client template found'
128
+        exit 429823
129
+    fi
130
+
126 131
     cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf $user_vpn_cert_file
127 132
     sed -i "s|remote .*|remote $DEFAULT_DOMAIN_NAME 1194|g" $user_vpn_cert_file
128 133
     sed -i 's|;user nobody|user nobody|g' $user_vpn_cert_file