Merge pull request #48 from ypid/optimized-copy-server-script

Optimized ovpn_copy_server_files script. No need to copy the config files.
This commit is contained in:
Kyle Manna 2015-05-30 16:09:50 -07:00
commit e0f7856e6f

View File

@ -17,18 +17,15 @@ else
TARGET="$OPENVPN/server" TARGET="$OPENVPN/server"
fi fi
rsync --recursive --verbose --prune-empty-dirs \ echo "
--exclude="clients" \ pki/private/${OVPN_CN}.key
--exclude="server" \ pki/issued/${OVPN_CN}.crt
--include "*/" \ pki/dh.pem
--include "/pki/private/${OVPN_CN}.key" \ pki/ta.key
--include "/pki/ca.crt" \ pki/ca.crt
--include "/pki/issued/${OVPN_CN}.crt" \ " | rsync --recursive --verbose \
--include "/pki/dh.pem" \ --files-from - \
--include "ta.key" \
--include "/openvpn.conf" \
--include "/ovpn_env.sh" \
--exclude="*" \
"$OPENVPN/" "$TARGET" "$OPENVPN/" "$TARGET"
ln --symbolic --force ../openvpn.conf ../ovpn_env.sh "$TARGET"
echo "Created the openvpn configuration for the server: $TARGET" echo "Created the openvpn configuration for the server: $TARGET"