diff options
Diffstat (limited to 'src/transport/upnp.sh')
-rwxr-xr-x | src/transport/upnp.sh | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/transport/upnp.sh b/src/transport/upnp.sh deleted file mode 100755 index d01a1a1a1..000000000 --- a/src/transport/upnp.sh +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | if [ $2 -eq 1 ] | ||
4 | then | ||
5 | if [ ! -d /tmp/netjail_scripts ] | ||
6 | then | ||
7 | mkdir /tmp/netjail_scripts | ||
8 | fi | ||
9 | |||
10 | ext_ifname=$(ip addr |grep UP|grep "@"|awk -F: '{printf $2"\n"}'|tr -d " "|awk -F@ '{printf $1" "}'|awk '{printf $1}') | ||
11 | listening_ip=$(ip addr |grep UP|grep "@"|awk -F: '{printf $2"\n"}'|tr -d " "|awk -F@ '{printf $1" "}'|awk '{printf $2}') | ||
12 | uuid=$(uuidgen) | ||
13 | cat miniupnpd.conf |sed 's/#ext_ifname=eth1/ext_ifname='$ext_ifname'/g'|sed 's/#listening_ip=eth0/listening_ip='$listening_ip'/g'|sed 's/uuid=73a9cb68-a00b-4d2c-8412-75fc989f0c6/uuid='$uuid'/g'|grep -v "^#"|grep -v '^$' > /tmp/netjail_scripts/gargoyle.txt | ||
14 | miniupnpd -d -f /tmp/netjail_scripts/gargoyle.txt -P /tmp/netjail_scripts/miniupnpd_$1.pid & | ||
15 | else | ||
16 | kill $(cat /tmp/netjail_scripts/miniupnpd_$1.pid) | ||
17 | fi | ||
18 | |||
19 | |||
20 | |||
21 | |||
22 | |||