Add warning information when install based on OpenVZ

This commit is contained in:
Teddysun 2016-06-05 20:17:44 +09:00
parent bf436ed3bd
commit a88801cbf0

13
l2tp.sh
View File

@ -199,6 +199,19 @@ version_check(){
preinstall_l2tp(){
echo
if [ -d "/proc/vz" ]; then
echo -e "\033[41;37m WARNING: \033[0m Your VPS is based OpenVZ, Maybe the kernel does not support IPSec."
echo "Continue to install it? (y/n)"
read -p "(Default: n)" agree
[ -z ${agree} ] && agree="n"
if [ "${agree}" == "n" ]; then
echo
echo "L2TP install cancelled, nothing to do..."
echo
exit 0
fi
fi
echo
echo "Please input IP-Range:"
read -p "(Default Range: 192.168.18):" iprange