1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-03-09 15:50:00 +00:00

Little changes

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-03-15 23:41:24 +01:00
parent eaf506836a
commit 895182fdfe
4 changed files with 17 additions and 6 deletions

View file

@ -902,7 +902,7 @@ else
echo 'You need OpenMPTCProuter >= 0.30'
echo '===================================================================================='
echo 'Restarting systemd daemon...'
systemctl -q restart daemon-reload
systemctl -q daemon-reload
echo 'done'
echo 'Restarting systemd network...'
systemctl -q restart systemd-networkd

View file

@ -4,5 +4,5 @@
INTF=gt-${DEV}
[ -z "$LOCALIP" ] && LOCALIP="10.255.255.1"
[ -z "$BROADCASTIP" ] && BROADCASTIP="10.255.255.3"
ip link set dev ${INTF} up
ip addr add ${LOCALIP}/30 brd ${BROADCASTIP} dev ${INTF}
ip link set dev ${INTF} up 2>&1 >/dev/null
ip addr add ${LOCALIP}/30 brd ${BROADCASTIP} dev ${INTF} 2>&1 >/dev/null

View file

@ -4,5 +4,5 @@
INTF=gt-udp-${DEV}
[ -z "$LOCALIP" ] && LOCALIP="10.255.254.1"
[ -z "$BROADCASTIP" ] && BROADCASTIP="10.255.254.3"
ip link set dev ${INTF} up
ip addr add ${LOCALIP}/30 brd ${BROADCASTIP} dev ${INTF}
ip link set dev ${INTF} up 2>&1 >/dev/null
ip addr add ${LOCALIP}/30 brd ${BROADCASTIP} dev ${INTF} 2>&1 >/dev/null

View file

@ -14,11 +14,22 @@ _multipath() {
}
_glorytun_udp() {
[ -z "$(glorytun show dev gt-udp-tun0 2>/dev/null | grep server)" ] && systemctl -q restart glorytun-udp@*
[ -z "$(glorytun show dev gt-udp-tun0 2>/dev/null | grep server)" ] && {
logger -t "OMR-Service" "Restart Glorytun-UDP"
systemctl -q restart glorytun-udp@*
}
}
_omr_api() {
[ -z "$(curl -s -k -m 1 https://127.0.0.1:65500/)" ] && {
logger -t "OMR-Service" "Restart OMR-Admin"
systemctl -q restart omr-admin
}
}
while true; do
_glorytun_udp
_multipath
_omr_api
sleep 10
done