1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-02-12 19:31:54 +00:00

Merge branch 'master' into develop

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-08-23 13:52:44 +00:00
commit 0fcb2c22f4
2 changed files with 19 additions and 18 deletions

View file

@ -141,6 +141,11 @@ if [ "$UPDATE" = "yes" ]; then
fi fi
echo "Update mode" echo "Update mode"
fi fi
# Force update key
[ -f /etc/apt/sources.list.d/openmptcprouter.list ] && {
echo "Update OpenMPTCProuter repo key"
wget -O - http://repo.openmptcprouter.com/openmptcprouter.gpg.key | apt-key add -
}
CURRENT_OMR="$(grep -s 'OpenMPTCProuter VPS' /etc/* | awk '{print $4}')" CURRENT_OMR="$(grep -s 'OpenMPTCProuter VPS' /etc/* | awk '{print $4}')"
if [ "$REINSTALL" = "no" ] && [ "$CURRENT_OMR" = "$OMR_VERSION" ]; then if [ "$REINSTALL" = "no" ] && [ "$CURRENT_OMR" = "$OMR_VERSION" ]; then
@ -679,18 +684,12 @@ if [ "$V2RAY" = "yes" ]; then
else else
apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" -y install v2ray=${V2RAY_VERSION} apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" -y install v2ray=${V2RAY_VERSION}
fi fi
if [ -f /etc/v2ray/v2ray-server.conf ] && [ ! -f /etc/systemd/system/v2ray.service ]; then
wget -O /etc/systemd/system/v2ray.service ${VPSURL}${VPSPATH}/old-v2ray.service
fi
if [ ! -f /etc/v2ray/v2ray-server.json ]; then if [ ! -f /etc/v2ray/v2ray-server.json ]; then
wget -O /etc/v2ray/v2ray-server.json ${VPSURL}${VPSPATH}/v2ray-server.json wget -O /etc/v2ray/v2ray-server.json ${VPSURL}${VPSPATH}/v2ray-server.json
sed -i "s:V2RAY_UUID:$V2RAY_UUID:g" /etc/v2ray/v2ray-server.json sed -i "s:V2RAY_UUID:$V2RAY_UUID:g" /etc/v2ray/v2ray-server.json
rm /etc/v2ray/config.json rm /etc/v2ray/config.json
ln -s /etc/v2ray/v2ray-server.json /etc/v2ray/config.json ln -s /etc/v2ray/v2ray-server.json /etc/v2ray/config.json
fi fi
ln -sf /etc/v2ray/v2ray-server.json /etc/v2ray/config.json
sed -i 's:debug:warning:' /etc/v2ray/v2ray-server.json
rm -f /tmp/v2rayError.log
if [ -f /etc/systemd/system/v2ray.service.dpkg-dist ]; then if [ -f /etc/systemd/system/v2ray.service.dpkg-dist ]; then
mv -f /etc/systemd/system/v2ray.service.dpkg-dist /etc/systemd/system/v2ray.service mv -f /etc/systemd/system/v2ray.service.dpkg-dist /etc/systemd/system/v2ray.service
fi fi

View file

@ -79,6 +79,7 @@ _lan_route() {
_gre_tunnels() { _gre_tunnels() {
. "$(readlink -f "/etc/shorewall/params.vpn")" . "$(readlink -f "/etc/shorewall/params.vpn")"
if [ -n "$OMR_ADDR" ]; then
for intf in /etc/openmptcprouter-vps-admin/intf/*; do for intf in /etc/openmptcprouter-vps-admin/intf/*; do
if [ -f "$intf" ]; then if [ -f "$intf" ]; then
. "$(readlink -f "$intf")" . "$(readlink -f "$intf")"
@ -92,6 +93,7 @@ _gre_tunnels() {
fi fi
fi fi
done done
fi
} }
_openvpn_bonding() { _openvpn_bonding() {