copy_server_files: Include ccd directory

* Include the client configuration directory
* Related to #133
This commit is contained in:
Kyle Manna 2016-09-16 07:36:12 -07:00
parent 62b6cc3db9
commit a17dfd7808

View File

@ -29,13 +29,15 @@ FILES=(
"pki/dh.pem" "pki/dh.pem"
"pki/ta.key" "pki/ta.key"
"pki/ca.crt" "pki/ca.crt"
"ccd"
) )
# Ensure the ccd directory exists, even if empty
mkdir -p "ccd"
# rsync isn't available to keep size down # rsync isn't available to keep size down
# cp --parents isn't in busybox version # cp --parents isn't in busybox version
# hack the directory structure with tar # hack the directory structure with tar
tar cf - -C "${OPENVPN}" "${FILES[@]}" | tar xvf - -C "${TARGET}" tar cf - -C "${OPENVPN}" "${FILES[@]}" | tar xvf - -C "${TARGET}"
mkdir -p "$TARGET/ccd"
echo "Created the openvpn configuration for the server: $TARGET" echo "Created the openvpn configuration for the server: $TARGET"