Skip to content

Commit

Permalink
dont use mirrors.163.com and ntpdate in travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
polym committed Jul 9, 2018
1 parent b11e5ed commit 6c9e3f0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ set -xe
pkgs="wget curl vim tmux git gcc g++ make automake autoconf patch libtool ntpdate ack-grep tcpdump python openssh-server"

### Apt Install
sed -i 's/archive.ubuntu.com/mirrors.163.com/' /etc/apt/sources.list
if [ "$CI" != "true" ]; then
# travis ci connect 163.com timeout
sed -i 's/archive.ubuntu.com/mirrors.163.com/' /etc/apt/sources.list
fi
apt-get update && apt-get install -y $pkgs

### System Config
unlink /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ntpdate -u -o3 time1.aliyun.com
if [ "$CI" != "true" ]; then
ntpdate -u -o3 time1.aliyun.com
fi
mkdir -p /etc/cron.d && echo "0 * * * * (ntpdate -u -o3 time1.aliyun.com)" > /etc/cron.d/ntpdate
echo "nameserver 114.114.114.114" > /etc/resolv.conf

Expand Down

0 comments on commit 6c9e3f0

Please sign in to comment.