Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chapter1 fixed started script #8

Open
pjzhong opened this issue Jan 3, 2024 · 0 comments
Open

chapter1 fixed started script #8

pjzhong opened this issue Jan 3, 2024 · 0 comments

Comments

@pjzhong
Copy link

pjzhong commented Jan 3, 2024

#!/bin/bash
cargo b --release
sudo setcap cap_net_admin=eip ./target/release/tcp
./target/release/tcp & 
pid=$1
sudo ip addr add 192.168.0.1/24 dev tun0
trap "kill $pid" INT TERM
wait $pid

fix pid=$1 to pid=$1, so the pid var is correcly assigned?

#!/bin/bash
cargo b --release
sudo setcap cap_net_admin=eip ./target/release/tcp
./target/release/tcp & 
pid=$!
sudo ip addr add 192.168.0.1/24 dev tun0
trap "kill $pid" INT TERM
wait $pid
@pjzhong pjzhong changed the title chapter1 fixed started started script chapter1 fixed started script Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant