Skip to content

Commit

Permalink
reversing order
Browse files Browse the repository at this point in the history
we reverse the order, to be able to turn profiles down starting from the last added
  • Loading branch information
francescor authored Mar 19, 2022
1 parent 9aca6b3 commit 0c81e34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wirego
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ if [ "`which wg`" == "" ] ; then
fi

# check for active profile
active_profiles=`sudo wg | grep interface | awk '{print $2}'`
# we reverse the order, to be able to turn profiles down starting from the last added
active_profiles=`sudo wg | grep interface | awk '{print $2}' | tac`

# up selected
if [ "$1" == "up" ] ; then
Expand Down

0 comments on commit 0c81e34

Please sign in to comment.