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

Update to 4.14.77 kernel and fixes

This commit is contained in:
Ycarus (Yannick Chabanois) 2018-11-01 08:29:02 +00:00
parent 8b15c8a4f8
commit 91079cde73
3 changed files with 18 additions and 9 deletions

View file

@ -9,6 +9,7 @@
"verbose":0, "verbose":0,
"prefer_ipv6": false, "prefer_ipv6": false,
"fast_open": true, "fast_open": true,
"no_delay": true,
"reuse_port": true, "reuse_port": true,
"mptcp": true "mptcp": true
} }

View file

@ -9,7 +9,7 @@ OPENVPN=${OPENVPN:-no}
INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | awk '{print $5}' | tr -d "\n")} INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | awk '{print $5}' | tr -d "\n")}
DEBIAN_VERSION=$(sed 's/\..*//' /etc/debian_version) DEBIAN_VERSION=$(sed 's/\..*//' /etc/debian_version)
KERNEL_VERSION="4.14.77-mptcp-b3b861b" KERNEL_VERSION="4.14.77-mptcp-b3b861b"
OMR_VERSION="0.58" OMR_VERSION="0.61"
set -e set -e
umask 0022 umask 0022
@ -22,10 +22,12 @@ fi
if grep --quiet 'OpenMPCTProuter VPS' /etc/motd ; then if grep --quiet 'OpenMPCTProuter VPS' /etc/motd ; then
sed -i 's/OpenMPCTProuter/OpenMPTCProuter/g' /etc/motd sed -i 's/OpenMPCTProuter/OpenMPTCProuter/g' /etc/motd
fi fi
# Check if OpenMPTCProuter VPS is already installed
if grep --quiet 'OpenMPTCProuter VPS' /etc/motd ; then if grep --quiet 'OpenMPTCProuter VPS' /etc/motd ; then
update="1" update="1"
fi elif grep --quiet 'OpenMPTCProuter VPS' /etc/motd.head ; then
if grep --quiet 'OpenMPTCProuter VPS' /etc/motd.head ; then update="1"
elif grep --quiet 'OpenMPTCProuter VPS' /root/openmptcprouter_config.txt ; then
update="1" update="1"
fi fi
# Install mptcp kernel and shadowsocks # Install mptcp kernel and shadowsocks
@ -88,7 +90,7 @@ if [ "$update" = "0" ]; then
sed -i "s:MySecretKey:$SHADOWSOCKS_PASS_JSON:g" /etc/shadowsocks-libev/config.json sed -i "s:MySecretKey:$SHADOWSOCKS_PASS_JSON:g" /etc/shadowsocks-libev/config.json
fi fi
sed -i 's:aes-256-cfb:chacha20:g' /etc/shadowsocks-libev/config.json sed -i 's:aes-256-cfb:chacha20:g' /etc/shadowsocks-libev/config.json
#sed -i 's:json:json --mptcp:g' /lib/systemd/system/shadowsocks-libev-server@.service sed -i 's:json:json --no-delay:g' /lib/systemd/system/shadowsocks-libev-server@.service
systemctl disable shadowsocks-libev systemctl disable shadowsocks-libev
systemctl enable shadowsocks-libev-server@config.service systemctl enable shadowsocks-libev-server@config.service
if [ $NBCPU -gt 1 ]; then if [ $NBCPU -gt 1 ]; then
@ -264,16 +266,20 @@ fi
# Add OpenMPTCProuter VPS script version to /etc/motd # Add OpenMPTCProuter VPS script version to /etc/motd
if [ -f /etc/motd.head ]; then if [ -f /etc/motd.head ]; then
if grep --quiet 'OpenMPTCProuter VPS' /etc/motd.head; then if grep --quiet 'OpenMPTCProuter VPS' /etc/motd.head; then
sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS $OMR_VERSION >:' /etc/motd.head sed -i "s:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS $OMR_VERSION >:" /etc/motd.head
sed -i "s:< OpenMPTCProuter VPS \$OMR_VERSION >:< OpenMPCTProuter VPS $OMR_VERSION >:" /etc/motd.head
else else
echo '< OpenMPTCProuter VPS $OMR_VERSION >' >> /etc/motd.head echo "< OpenMPTCProuter VPS $OMR_VERSION >" >> /etc/motd.head
fi fi
elif [ -f /etc/motd ]; then elif [ -f /etc/motd ]; then
if grep --quiet 'OpenMPTCProuter VPS' /etc/motd; then if grep --quiet 'OpenMPTCProuter VPS' /etc/motd; then
sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS $OMR_VERSION >:' /etc/motd sed -i "s:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS $OMR_VERSION >:" /etc/motd
sed -i "s:< OpenMPTCProuter VPS \$OMR_VERSION >:< OpenMPCTProuter VPS $OMR_VERSION >:" /etc/motd
else else
echo '< OpenMPTCProuter VPS $OMR_VERSION >' >> /etc/motd echo "< OpenMPTCProuter VPS $OMR_VERSION >" >> /etc/motd
fi fi
else
echo "< OpenMPTCProuter VPS $OMR_VERSION >" > /etc/motd
fi fi
if [ "$update" = "0" ]; then if [ "$update" = "0" ]; then

View file

@ -14,7 +14,9 @@ if [ -z "$(grep -m 1 vmlinuz $config_file | grep $kernel)" ]; then
while IFS= read ln while IFS= read ln
do do
if [ -n "$(echo $ln | grep $kernel)" ]; then if [ -n "$(echo $ln | grep $kernel)" ]; then
sed -i "s@^\(GRUB_DEFAULT=\).*@\1\"$x\"@" $deflt_file x=$(expr $x - 1)
sed -i "s@^\(GRUB_DEFAULT=\).*@\1\"1>$x\"@" $deflt_file
[ -f /boot/grub/grub.cfg ] && grub-mkconfig -o /boot/grub/grub.cfg >/dev/null 2>&1
exit 0 exit 0
fi fi
x=$(expr $x + 1) x=$(expr $x + 1)