diff options
author | Freya Murphy <freya@freyacat.org> | 2024-11-17 04:01:08 +0000 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-11-17 04:01:08 +0000 |
commit | 5e60794b428035db69899f229befac504d6dc043 (patch) | |
tree | 6135a66fcaad554b71f012f211e625f56faa787f /bin/inet2.sh | |
parent | add openwrt (diff) | |
download | freyanet-5e60794b428035db69899f229befac504d6dc043.tar.gz freyanet-5e60794b428035db69899f229befac504d6dc043.tar.bz2 freyanet-5e60794b428035db69899f229befac504d6dc043.zip |
Diffstat (limited to 'bin/inet2.sh')
-rwxr-xr-x | bin/inet2.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/inet2.sh b/bin/inet2.sh index cb98c6c..00f1168 100755 --- a/bin/inet2.sh +++ b/bin/inet2.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env sh +#!/bin/sh -. /var/lib/inet2/inet2.sh +. ${INET2_PREFIX}/share/inet2/inet2.sh runscripts() { if [ -n "$(getval "interface $2" "$1")" ]; then @@ -26,7 +26,7 @@ start() { rm -fr /run/inet2/wg 2> /dev/null mkdir -p /run/inet2/wg - /usr/local/bin/mkbirdconfig.sh + ${INET2_PREFIX}/bin/mkbirdconfig.sh step "Setting loopback addresses" getval Loopback | while read -r addr; do @@ -35,7 +35,7 @@ start() { getval interface | while read -r inter; do step "Generating config for $inter" - run /usr/local/bin/mkwgconfig.sh "$inter" /run/inet2/wg/"$inter" + run ${INET2_PREFIX}/bin/mkwgconfig.sh "$inter" /run/inet2/wg/"$inter" # create the wireguard interface *in the default namespace* step "Adding Wireguard interface $inter" @@ -90,7 +90,7 @@ stop() { reload() { getval interface | while read -r inter; do step "Generating config for $inter" - run /usr/local/bin/mkwgconfig.sh "$inter" /run/inet2/wg/"$inter" /etc/inet2.conf + run ${INET2_PREFIX}/bin/mkwgconfig.sh "$inter" /run/inet2/wg/"$inter" /etc/inet2.conf step "Setting Wireguard config for $inter" run wg setconf "$inter" /run/inet2/wg/"$inter" |