Skip to content

Commit d50f99d

Browse files
committed
fix the shell lint
1 parent 8b78704 commit d50f99d

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
- Google 的各种服务,比如:Gmail, Map, Docs,Driver,照片,图片搜索,Voices,论文搜索……包括Google官方的各种技术文档……
6363
- 一些云服务,比如:Dropbox,IFTTT,Imgur,archive.org……
6464
- Twitter 上 Follow 一些牛人和一些官方账号,比如:AWS、Docker……
65-
- 社交 Facebook, Telegram, WhatsappSlack…… 有一些我在国外的亲戚和朋友……
65+
- 社交 Facebook, Telegram, Whatsapp, Slack……有一些我在国外的亲戚和朋友……
6666
- Reddit 是一个聚合网站,一个新闻和文章的集散地,你可以认为是各种频道的今日头条……
6767
- Pinterest 和 Instagram 上面有很多不错的图片和视频新闻,是我减压力的地方……
6868
- 新闻,如BBC。 BBC是全球比较出众的媒体,有太多的有价值资源和内容了,比如纪录片、学英文……
@@ -93,7 +93,7 @@
9393

9494
### 2.1 常规VPS
9595

96-
对于VPS,下面是一些常规选项。
96+
对于 VPS,下面是一些常规选项。
9797

9898
- [AWS LightSail](https://lightsail.aws.amazon.com/) 是一个非常便宜好用的服务,最低配置一个月 $3.5 美金,目前的Zone不多,推荐使用日本或新加坡(支持银联卡)
9999
- [AWS EC2](https://aws.amazon.com/cn/)香港、日本或韩国申请个免费试用一年的EC2 VPS (支持银联卡)
@@ -783,7 +783,7 @@ $ kubectl edit cm nodelocaldns -n kube-system
783783
+ forward . /etc/resolv.conf {
784784
+ policy sequential
785785
+ }
786-
prometheus :9253
786+
prometheus: 9253
787787
}
788788
```
789789

scripts/install.ubuntu.18.04.sh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ start_bbr(){
4343

4444
install_bbr() {
4545
# 如果内核版本号满足最小要求
46-
if [ $VERSION_CURR > $VERSION_MIN ]; then
46+
if [[ $VERSION_CURR > $VERSION_MIN ]]; then
4747
check_bbr
4848
else
4949
update_core
@@ -118,12 +118,12 @@ install_gost() {
118118
fi
119119

120120
echo "准备启动 Gost 代理程序,为了安全,需要使用用户名与密码进行认证."
121-
read -p "请输入你要使用的域名:" DOMAIN
122-
read -p "请输入你要使用的用户名:" USER
123-
read -p "请输入你要使用的密码:" PASS
124-
read -p "请输入HTTP/2需要侦听的端口号(443):" PORT
121+
read -r -p "请输入你要使用的域名:" DOMAIN
122+
read -r -p "请输入你要使用的用户名:" USER
123+
read -r -p "请输入你要使用的密码:" PASS
124+
read -r -p "请输入HTTP/2需要侦听的端口号(443):" PORT
125125

126-
if [[ -z "${PORT// }" ]] || ! [[ "${PORT}" =~ ^[0-9]+$ ]] || ! [ "$PORT" -ge 1 -a "$PORT" -le 655535 ]; then
126+
if [[ -z "${PORT// }" ]] || ! [[ "${PORT}" =~ ^[0-9]+$ ]] || ! [ "$PORT" -ge 1 ] && [ "$PORT" -le 655535 ]; then
127127
echo -e "${COLOR_ERROR}非法端口,使用默认端口 443 !${COLOR_NONE}"
128128
PORT=443
129129
fi
@@ -172,12 +172,12 @@ install_shadowsocks(){
172172
fi
173173

174174
echo "准备启动 ShadowSocks 代理程序,为了安全,需要使用用户名与密码进行认证."
175-
read -p "请输入你要使用的密码:" PASS
176-
read -p "请输入ShadowSocks需要侦听的端口号(1984):" PORT
175+
read -r -p "请输入你要使用的密码:" PASS
176+
read -r -p "请输入ShadowSocks需要侦听的端口号(1984):" PORT
177177

178178
BIND_IP=0.0.0.0
179179

180-
if [[ -z "${PORT// }" ]] || ! [[ "${PORT}" =~ ^[0-9]+$ ]] || ! [ "$PORT" -ge 1 -a "$PORT" -le 655535 ]; then
180+
if [[ -z "${PORT// }" ]] || ! [[ "${PORT}" =~ ^[0-9]+$ ]] || ! [ "$PORT" -ge 1 ] && [ "$PORT" -le 655535 ]; then
181181
echo -e "${COLOR_ERROR}非法端口,使用默认端口 1984 !${COLOR_NONE}"
182182
PORT=1984
183183
fi
@@ -232,7 +232,7 @@ init(){
232232
COLUMNS=50
233233
echo -e "\n菜单选项\n"
234234

235-
while [ 1 == 1 ]
235+
while true
236236
do
237237
PS3="Please select a option:"
238238
re='^[0-9]+$'
@@ -257,7 +257,7 @@ init(){
257257
break
258258
elif (( REPLY == 3 )) ; then
259259
create_cert
260-
loop=1
260+
#loop=1
261261
break
262262
elif (( REPLY == 4 )) ; then
263263
install_gost
@@ -282,7 +282,8 @@ init(){
282282
done
283283
done
284284

285-
IFS=$OIFS # Restore the IFS
285+
echo "${opt}"
286+
IFS=$OIFS # Restore the IFS
286287
}
287288

288289
init

0 commit comments

Comments
 (0)