-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05e2fe4
commit 93bb5a6
Showing
5 changed files
with
63 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
sudo curl -L git.io/weave -o /usr/local/bin/weave | ||
sudo chmod a+x /usr/local/bin/weave | ||
weave reset --force | ||
sudo rm -fr /usr/local/bin/weave | ||
|
||
ip a | grep 'vethwepl.*\@' -oP | while read -r line ; do | ||
veth=${line::-1} | ||
if [[ $veth =~ [0-9] ]]; then | ||
echo check $veth | ||
pid=$(echo $veth | tr -dc '0-9') | ||
if ! ps -p $pid > /dev/null; then | ||
echo deleting $veth | ||
ip link delete $veth >&2 | ||
else | ||
echo $veth still running | ||
fi | ||
else | ||
echo $veth veth has no number in it and will not be deleted | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters