mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
Fix on current-vpn file doesn't exist
This commit is contained in:
parent
f4beb2f5a5
commit
68211f2033
2 changed files with 2 additions and 1 deletions
|
@ -389,6 +389,7 @@ if [ "$OMR_ADMIN" = "yes" ]; then
|
||||||
pip3 -q install fastapi netjsonconfig python-multipart -U
|
pip3 -q install fastapi netjsonconfig python-multipart -U
|
||||||
mkdir -p /etc/openmptcprouter-vps-admin/omr-6in4
|
mkdir -p /etc/openmptcprouter-vps-admin/omr-6in4
|
||||||
mkdir -p /etc/openmptcprouter-vps-admin/intf
|
mkdir -p /etc/openmptcprouter-vps-admin/intf
|
||||||
|
[ ! -f "/etc/openmptcprouter-vps-admin/current-vpn" ] && echo "glorytun_tcp" > /etc/openmptcprouter-vps-admin/current-vpn
|
||||||
mkdir -p /var/opt/openmptcprouter
|
mkdir -p /var/opt/openmptcprouter
|
||||||
if [ "$SOURCES" = "yes" ]; then
|
if [ "$SOURCES" = "yes" ]; then
|
||||||
wget -O /lib/systemd/system/omr-admin.service ${VPSURL}${VPSPATH}/omr-admin.service.in
|
wget -O /lib/systemd/system/omr-admin.service ${VPSURL}${VPSPATH}/omr-admin.service.in
|
||||||
|
|
|
@ -27,7 +27,7 @@ _glorytun_tcp() {
|
||||||
for intf in /etc/glorytun-tcp/tun*; do
|
for intf in /etc/glorytun-tcp/tun*; do
|
||||||
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
|
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
|
||||||
done
|
done
|
||||||
if [ "$(cat /etc/openmptcprouter-vps-admin/current-vpn)" = "glorytun_tcp" ]; then
|
if [ -f /etc/openmptcprouter-vps-admin/current-vpn ] && [ "$(cat /etc/openmptcprouter-vps-admin/current-vpn)" = "glorytun_tcp" ]; then
|
||||||
if [ "$(ping -c 5 -w 5 10.255.255.2 | grep '100%')" != "" ]; then
|
if [ "$(ping -c 5 -w 5 10.255.255.2 | grep '100%')" != "" ]; then
|
||||||
logger -t "OMR-Service" "No answer from VPN client end, restart Glorytun-TCP"
|
logger -t "OMR-Service" "No answer from VPN client end, restart Glorytun-TCP"
|
||||||
systemctl restart glorytun-tcp@tun0
|
systemctl restart glorytun-tcp@tun0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue