aboutsummaryrefslogtreecommitdiffstats
path: root/netns.sh
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2020-05-17 22:07:59 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2020-05-17 22:07:59 +0200
commit16f21989b476f6dae5de0cf1607805cfc308a0f5 (patch)
tree34909cd00f757093988b8ae9139cb2dd25373bd3 /netns.sh
parentRemove "list_peers" and "lookup_peer". (diff)
downloadwireguard-rs-16f21989b476f6dae5de0cf1607805cfc308a0f5.tar.xz
wireguard-rs-16f21989b476f6dae5de0cf1607805cfc308a0f5.zip
Elimited Daemonize dependencyrm-dummy
Diffstat (limited to 'netns.sh')
-rwxr-xr-xnetns.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/netns.sh b/netns.sh
index 54b58c9..d2273a3 100755
--- a/netns.sh
+++ b/netns.sh
@@ -87,6 +87,9 @@ ip0 link set wg1 netns $netns1
n0 $program wg2
ip0 link set wg2 netns $netns2
+# wait for programs to start
+sleep 0.1
+
key1="$(pp wg genkey)"
key2="$(pp wg genkey)"
pub1="$(pp wg pubkey <<<"$key1")"
@@ -102,6 +105,8 @@ configure_peers() {
ip2 addr add 192.168.241.2/24 dev wg2
ip2 addr add fd00::2/24 dev wg2
+ n0 wg
+
n0 wg set wg1 \
private-key <(echo "$key1") \
listen-port 10000 \
@@ -120,9 +125,9 @@ configure_peers() {
ip1 link set up dev wg1
ip2 link set up dev wg2
- sleep 1
echo "ready"
}
+
configure_peers
tests() {