dnk: get client IP from client config
This commit is contained in:
parent
2ae8cf9a50
commit
7ae9f27a9f
@ -75,7 +75,7 @@ function add_user_to_server {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local USER_PUB_KEY=$(cat "keys/${USER}/public.key")
|
local USER_PUB_KEY=$(cat "keys/${USER}/public.key")
|
||||||
local USER_IP=$( get_new_ip )
|
local USER_IP=$(grep -i Address "keys/${USER}/${USER}.conf" | sed 's/Address\s*=\s*//i; s/\/.*//')
|
||||||
|
|
||||||
if grep "# BEGIN ${USER}$" "$HOME_DIR/$SERVER_NAME.conf" >/dev/null ; then
|
if grep "# BEGIN ${USER}$" "$HOME_DIR/$SERVER_NAME.conf" >/dev/null ; then
|
||||||
echo "User already exists"
|
echo "User already exists"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user