network-scripts/wireguard/testing/gentest

31 lines
576 B
Text
Raw Normal View History

2025-08-12 23:01:13 -04:00
#!/bin/bash
#---ini file parameters
unset PARAMS;
PARAMS=(
'Rtr_Addr_Public,Router Adresse Publique'
'Rrt_Port,Router Port'
'Rtr_Addr_Private,Router Adresse Privee'
'Rtr_CIDR_Mask,Router Private CIDR Mask'
'Rtr_PUB_KEY,Router Public Key'
)
for PARAM in "${PARAMS[@]}"
do
{ IFS=, read Param Desc; } <<< ${PARAM}
read -p "Entrer ${Desc} : " Value
eval ${Param}="${Value}"
done
echo -e "\n"
echo -e "
Rtr_Addr_Public = $Rtr_Addr_Public
Rrt_Port = $Rrt_Port
Rtr_Addr_Private = $Rtr_Addr_Private
Rtr_CIDR_Private = $Rtr_CIDR_Mask
Rtr_PUB_KEY = $Rtr_PUB_KEY
" | column -t