From 96f05af15089896afd259655bd5a5699d726e257 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Sat, 17 Feb 2024 15:45:18 +0900 Subject: [PATCH] wgConfigGen: Reduce config filename length --- wireguardConfigGenerator.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wireguardConfigGenerator.sh b/wireguardConfigGenerator.sh index 30b1d78..be2228e 100755 --- a/wireguardConfigGenerator.sh +++ b/wireguardConfigGenerator.sh @@ -161,7 +161,7 @@ mkdir -p "$HOME/temp" TEMP_DIR=$(mktemp -d -p "$HOME/temp") # first create server config -SERVER_CONF="${TEMP_DIR}/${WGNAME}server.conf" +SERVER_CONF="${TEMP_DIR}/${WGNAME}serv.conf" SERVER_PRK="$(wg genkey)" SERVER_PUB="$(echo -n ${SERVER_PRK} | wg pubkey)" @@ -175,7 +175,7 @@ EOF # generate config per each client for ((i = 0; i < $CLIENT_COUNT; ++i)); do - CLIENT_CONF="${TEMP_DIR}/${WGNAME}client${i}.conf" + CLIENT_CONF="${TEMP_DIR}/${WGNAME}cli${i}.conf" CLIENT_PRK="$(wg genkey)" CLIENT_PUB="$(echo -n ${CLIENT_PRK} | wg pubkey)" CLIENT_PRE="$(wg genpsk)" @@ -215,7 +215,7 @@ echo "Placing generated configs to output directory..." cp -v "$SERVER_CONF" "${CONFIG_OUTPUT_DIRECTORY}/" for ((i = 0; i < $CLIENT_COUNT; ++i)); do - cp -v "${TEMP_DIR}/${WGNAME}client${i}.conf" "${CONFIG_OUTPUT_DIRECTORY}/" + cp -v "${TEMP_DIR}/${WGNAME}cli${i}.conf" "${CONFIG_OUTPUT_DIRECTORY}/" done echo "Removing temporary directory..."