sync time: v2ray time

This commit is contained in:
233boy
2018-11-25 11:39:45 +08:00
parent b361a420e2
commit 5871d57acb
2 changed files with 8 additions and 4 deletions

View File

@@ -872,13 +872,14 @@ install_v2ray() {
# $cmd install -y lrzsz git zip unzip curl wget qrencode bind-utils iptables-services
# fi
if [[ $cmd == "apt-get" ]]; then
$cmd install -y lrzsz git zip unzip curl wget qrencode libcap2-bin ntpdate
$cmd install -y lrzsz git zip unzip curl wget qrencode libcap2-bin
else
$cmd install -y lrzsz git zip unzip curl wget qrencode libcap iptables-services ntpdate
$cmd install -y lrzsz git zip unzip curl wget qrencode libcap iptables-services
fi
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[ -d /etc/v2ray ] && rm -rf /etc/v2ray
ntpdate -u cn.pool.ntp.org
#sync time..
date -s "$(curl -sI g.cn | grep Date | cut -d' ' -f3-6)Z"
if [[ $local_install ]]; then
if [[ ! -d $(pwd)/config ]]; then