mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-02-12 19:31:54 +00:00
24 lines
455 B
Bash
Executable file
24 lines
455 B
Bash
Executable file
#!/bin/bash
|
|
# OpenMPTCProuter VPS service script
|
|
|
|
_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
|
|
}
|
|
|
|
_glorytun_udp() {
|
|
[ -z "$(glorytun show dev gt-udp-tun0 2>/dev/null | grep server)" ] && systemctl -q restart glorytun-udp@*
|
|
}
|
|
|
|
while true; do
|
|
_glorytun_udp
|
|
_multipath
|
|
sleep 10
|
|
done
|