]> git.donarmstrong.com Git - bin.git/blobdiff - add_openvpn_host
* update add_openvpn_host to not create keys with the name of the host
[bin.git] / add_openvpn_host
index 0b9e311aad9a967b20c886a2a4bcf85455b059ea..d85eeb9b2fa0586ecbe18fb9e2a5aa0a9ae5c184 100755 (executable)
@@ -44,15 +44,15 @@ ORIGDIR=$(pwd);
        -out "$TMPDIR"/"${HOST}".cert -outdir "$TMPDIR" -notext -days 9000 -batch -infiles "${HOST}".req; #> /dev/null 2>&1
     chmod a+r "${HOST}".cert
     rm -f "${HOST}".req
-    ln -sf "${HOST}".cert "${CLIENT_CERT}"
-    ln -sf "${HOST}".pem "${CLIENT_KEY}"
+    mv "${HOST}".cert "${CLIENT_CERT}"
+    mv "${HOST}".pem "${CLIENT_KEY}"
 )
 
 cp "${CONF}" "${TMPDIR}"/;
 cp "${SERVER_CACERT}" "${TMPDIR}"/;
 
 tar -zcf "${HOST}".tar.gz -C "${TMPDIR}" \
-    "${HOST}".cert "${HOST}".pem "${CLIENT_CERT}" "${CONF}" \
+    "${CLIENT_CERT}" "${CONF}" \
     "${CLIENT_KEY}" "${SERVER_CACERT}"
 rm -rf "${TMPDIR}"