diff options
author | NLight Савченко В. М <admin@nlight.org.ua> | 2013-01-06 19:36:20 +0200 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2013-10-21 23:12:47 +0200 |
commit | f182d63c34bb89cfa2f0061b95058d9ac01cfcd1 (patch) | |
tree | fe1e3a67b3f11c18659176f1ebf936aad18718da | |
parent | 6e67af725eaa9f5fa6c1bc04339223ba44f096ce (diff) | |
download | udp-broadcast-relay-f182d63c34bb89cfa2f0061b95058d9ac01cfcd1.tar.gz udp-broadcast-relay-f182d63c34bb89cfa2f0061b95058d9ac01cfcd1.zip |
Contributed ppp-scripts
-rw-r--r-- | ppp-if.up-local | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ppp-if.up-local b/ppp-if.up-local new file mode 100644 index 0000000..a4c9dff --- /dev/null +++ b/ppp-if.up-local @@ -0,0 +1,40 @@ +In /etc/ppp/ + +1) find end edit "ip-up.local" or create it if not exists (else edit "ip-up" if .local is not supported, but not recommended) + +Put next: + + +--BEGIN-- +#!/bin/bash +PATH=/sbin:/usr/sbin:/bin:/usr/bin +export PATH +if [ "$(pidof udp-broadcast-relay)" ] +then + killall udp-broadcast-relay + echo "VPN client joined. Resetting UDP Broadcast Relay on port 6112" +fi +udp-broadcast-relay -f 1 6112 eth0 $(for i in $( ifconfig | grep 'ppp' | awk '{print $1}' ); do printf "$i "; done) +exit 0 +--END-- + +where 6112 is a port we are listening for the game broadcasts. + + +2) find end edit "ip-down.local" or create it if not exists (else edit "ip-down" if .local is not supported, but not recommended) + + +--BEGIN-- +#!/bin/bash +PATH=/sbin:/usr/sbin:/bin:/usr/bin +export PATH + + +if [ "$(pidof udp-broadcast-relay)" ] +then + killall udp-broadcast-relay + echo "VPN client left. Resetting UDP Broadcast Relay on port 6112" + udp-broadcast-relay -f 1 6112 eth0 $(for i in $( ifconfig | grep 'ppp' | awk '{print $1}' ); do printf "$i "; done) +fi +exit 0 +--END-- |