|
|
|
@ -90,7 +90,7 @@ case "$1" in |
|
|
|
esac |
|
|
|
fi |
|
|
|
echo -n "Starting $DESC: $NAME" |
|
|
|
if [ $TABLE -ge 0 ] && [ "$VIRT" != "yes" ]; then |
|
|
|
if [ "$TABLE" -ge 0 ] && [ "$VIRT" != "yes" ]; then |
|
|
|
set +e |
|
|
|
modprobe xt_MEDIAPROXY |
|
|
|
if [ -e /proc/mediaproxy/control ]; then |
|
|
|
@ -99,13 +99,13 @@ case "$1" in |
|
|
|
iptables -N mediaproxy 2> /dev/null |
|
|
|
iptables -D INPUT -j mediaproxy 2> /dev/null |
|
|
|
iptables -I INPUT -j mediaproxy |
|
|
|
iptables -D mediaproxy -p udp -j MEDIAPROXY --id $TABLE 2>/dev/null |
|
|
|
iptables -I mediaproxy -p udp -j MEDIAPROXY --id $TABLE |
|
|
|
iptables -D mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" 2>/dev/null |
|
|
|
iptables -I mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" |
|
|
|
ip6tables -N mediaproxy 2> /dev/null |
|
|
|
ip6tables -D INPUT -j mediaproxy 2> /dev/null |
|
|
|
ip6tables -I INPUT -j mediaproxy |
|
|
|
ip6tables -D mediaproxy -p udp -j MEDIAPROXY --id $TABLE 2>/dev/null |
|
|
|
ip6tables -I mediaproxy -p udp -j MEDIAPROXY --id $TABLE |
|
|
|
ip6tables -D mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" 2>/dev/null |
|
|
|
ip6tables -I mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" |
|
|
|
set -e |
|
|
|
fi |
|
|
|
start-stop-daemon --start --quiet --pidfile $PIDFILE \ |
|
|
|
@ -119,15 +119,15 @@ case "$1" in |
|
|
|
if [ "$?" -ne 0 ]; then |
|
|
|
return $? |
|
|
|
fi |
|
|
|
if [ $TABLE -ge 0 ] && [ "$VIRT" != "yes" ]; then |
|
|
|
if [ "$TABLE" -ge 0 ] && [ "$VIRT" != "yes" ]; then |
|
|
|
set +e |
|
|
|
if [ -e /proc/mediaproxy/control ]; then |
|
|
|
echo "del $TABLE" > /proc/mediaproxy/control 2>/dev/null |
|
|
|
fi |
|
|
|
iptables -D INPUT -j mediaproxy 2> /dev/null |
|
|
|
iptables -D mediaproxy -p udp -j MEDIAPROXY --id $TABLE 2>/dev/null |
|
|
|
iptables -D mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" 2>/dev/null |
|
|
|
ip6tables -D INPUT -j mediaproxy 2> /dev/null |
|
|
|
ip6tables -D mediaproxy -p udp -j MEDIAPROXY --id $TABLE 2>/dev/null |
|
|
|
ip6tables -D mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" 2>/dev/null |
|
|
|
rmmod xt_MEDIAPROXY 2>/dev/null |
|
|
|
set -e |
|
|
|
fi |
|
|
|
@ -156,24 +156,24 @@ case "$1" in |
|
|
|
;; |
|
|
|
esac |
|
|
|
fi |
|
|
|
if [ $TABLE -ge 0 ] && [ "$VIRT" != "yes" ]; then |
|
|
|
if [ "$TABLE" -ge 0 ] && [ "$VIRT" != "yes" ]; then |
|
|
|
sleep 1 |
|
|
|
set +e |
|
|
|
if [ -e /proc/mediaproxy/control ]; then |
|
|
|
echo "del $TABLE" > /proc/mediaproxy/control 2>/dev/null |
|
|
|
fi |
|
|
|
iptables -D INPUT -j mediaproxy 2> /dev/null |
|
|
|
iptables -D mediaproxy -p udp -j MEDIAPROXY --id $TABLE 2>/dev/null |
|
|
|
iptables -D mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" 2>/dev/null |
|
|
|
ip6tables -D INPUT -j mediaproxy 2> /dev/null |
|
|
|
ip6tables -D mediaproxy -p udp -j MEDIAPROXY --id $TABLE 2>/dev/null |
|
|
|
ip6tables -D mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" 2>/dev/null |
|
|
|
rmmod xt_MEDIAPROXY 2>/dev/null |
|
|
|
modprobe xt_MEDIAPROXY |
|
|
|
iptables -N mediaproxy 2> /dev/null |
|
|
|
iptables -I INPUT -j mediaproxy |
|
|
|
iptables -I mediaproxy -p udp -j MEDIAPROXY --id $TABLE |
|
|
|
iptables -I mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" |
|
|
|
ip6tables -N mediaproxy 2> /dev/null |
|
|
|
ip6tables -I INPUT -j mediaproxy |
|
|
|
ip6tables -I mediaproxy -p udp -j MEDIAPROXY --id $TABLE |
|
|
|
ip6tables -I mediaproxy -p udp -j MEDIAPROXY --id "$TABLE" |
|
|
|
set -e |
|
|
|
fi |
|
|
|
start-stop-daemon --start --quiet --pidfile \ |
|
|
|
|