Browse Source

wg-up: do not use absolute path

Peter Cai 1 year ago
parent
commit
00cb5d4c15
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      wg-up.sh

+ 1
- 1
wg-up.sh View File

@@ -1,7 +1,7 @@
1 1
 #!/bin/bash
2 2
 CONFIG_NAME="$1"
3 3
 DEV_NAME="wg-$CONFIG_NAME"
4
-source /home/peter/wg/ext/$CONFIG_NAME.conf
4
+source ${BASH_SOURCE%/*}/ext/$CONFIG_NAME.conf
5 5
 
6 6
 ip netns add $CONFIG_NAME
7 7
 ip netns exec $CONFIG_NAME ip link set lo up

Loading…
Cancel
Save