2018-06-01 13:11:58 +00:00
|
|
|
#!/bin/bash
|
2018-07-27 12:40:12 +00:00
|
|
|
# OpenMPTCProuter VPS service script
|
2018-06-01 13:11:58 +00:00
|
|
|
|
2019-01-02 08:57:31 +00:00
|
|
|
_multipath() {
|
|
|
|
# Force multipath status
|
|
|
|
source /etc/shorewall/params.net
|
|
|
|
for intf in `ls -1 /sys/class/net`; do
|
|
|
|
if [ "$intf" = "$NET_IFACE" ]; then
|
|
|
|
multipath $intf on
|
|
|
|
else
|
|
|
|
multipath $intf off
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
2018-07-27 12:40:12 +00:00
|
|
|
|
2020-03-12 18:38:43 +00:00
|
|
|
_glorytun_udp() {
|
|
|
|
[ -z "$(glorytun show dev gt-udp-tun0 2>/dev/null | grep server)" ] && systemctl -q restart glorytun-udp@*
|
|
|
|
}
|
|
|
|
|
2018-06-01 13:11:58 +00:00
|
|
|
while true; do
|
2020-03-12 18:38:43 +00:00
|
|
|
_glorytun_udp
|
2020-03-10 09:45:06 +00:00
|
|
|
_multipath
|
2019-05-12 02:45:49 +00:00
|
|
|
sleep 10
|
2018-06-01 13:11:58 +00:00
|
|
|
done
|