sync time: v2ray time

pull/95/head
233boy 6 years ago
parent a6860e5897
commit 55be4011ea
  1. 6
      install.sh
  2. 5
      v2ray.sh

@ -711,13 +711,13 @@ caddy_config() {
install_v2ray() { install_v2ray() {
$cmd update -y $cmd update -y
if [[ $cmd == "apt-get" ]]; then 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 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 fi
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[ -d /etc/v2ray ] && rm -rf /etc/v2ray [ -d /etc/v2ray ] && rm -rf /etc/v2ray
ntpdate -u cn.pool.ntp.org date -s "$(curl -sI g.cn | grep Date | cut -d' ' -f3-6)Z"
if [[ $local_install ]]; then if [[ $local_install ]]; then
if [[ ! -d $(pwd)/config ]]; then if [[ ! -d $(pwd)/config ]]; then

@ -10,7 +10,7 @@ none='\e[0m'
# Root # Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v3.05" _version="v3.06"
cmd="apt-get" cmd="apt-get"
@ -2928,6 +2928,9 @@ reload)
clear clear
view_v2ray_config_info view_v2ray_config_info
;; ;;
time)
date -s "$(curl -sI g.cn | grep Date | cut -d' ' -f3-6)Z"
;;
log) log)
view_v2ray_log view_v2ray_log
;; ;;

Loading…
Cancel
Save