move socat proxy stuff into its own init script
This commit is contained in:
parent
2341e738cc
commit
60fac5579a
3 changed files with 23 additions and 10 deletions
19
assets/stream_proxy
Executable file
19
assets/stream_proxy
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=99
|
||||||
|
|
||||||
|
start() {
|
||||||
|
# install socat to ram
|
||||||
|
if [ ! -f /tmp/usr/bin/socat ]; then
|
||||||
|
/bin/sleep 60
|
||||||
|
opkg update
|
||||||
|
opkg install socat -d ram
|
||||||
|
fi
|
||||||
|
|
||||||
|
# start stream proxy
|
||||||
|
/tmp/usr/bin/socat TCP-LISTEN:8000,reuseaddr,fork,su=nobody,pf=ip6 TCP:192.168.3.4:8000 &
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
killall socat
|
||||||
|
}
|
|
@ -13,13 +13,5 @@ boot() {
|
||||||
# ipv6 fixed
|
# ipv6 fixed
|
||||||
/sbin/ip -6 addr add 2a03:2260:a:b::1:66/64 dev br-client
|
/sbin/ip -6 addr add 2a03:2260:a:b::1:66/64 dev br-client
|
||||||
|
|
||||||
# install socat to ram
|
|
||||||
/bin/sleep 60
|
|
||||||
opkg update
|
|
||||||
opkg install socat -d ram
|
|
||||||
|
|
||||||
# start stream proxy
|
|
||||||
/tmp//usr/bin/socat TCP-LISTEN:8000,reuseaddr,fork,su=nobody,pf=ip6 TCP:192.168.3.4:8000 &
|
|
||||||
|
|
||||||
echo zz_custom ended | logger
|
echo zz_custom ended | logger
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,10 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# stream setup
|
# stream setup
|
||||||
scp assets/zz_custom root@[$ffka_querfunk_mgmt]:/etc/init.d/
|
for i in zz_custom stream_proxy; do
|
||||||
ssh root@$ffka_querfunk_mgmt "/etc/init.d/zz_custom enable"
|
scp assets/$i root@[$ffka_querfunk_mgmt]:/etc/init.d/
|
||||||
|
ssh root@$ffka_querfunk_mgmt "/etc/init.d/$i enable"
|
||||||
|
done
|
||||||
|
|
||||||
# http://querfunk.ffka
|
# http://querfunk.ffka
|
||||||
echo FIXME scp assets/index.html root@[$ffka_querfunk_mgmt]:/lib/gluon/status-page/www/
|
echo FIXME scp assets/index.html root@[$ffka_querfunk_mgmt]:/lib/gluon/status-page/www/
|
||||||
|
|
Reference in a new issue