@wjwjq/release-helper 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.release/release.conf.yaml +4 -1
- package/dist/deploy/pkg/nginx_binary/compile.sh +37 -0
- package/dist/deploy/pkg/nginx_binary/nginx-x86_64-ssl1.0.2.tar.gz +0 -0
- package/dist/deploy/pkg/nginx_binary/nginx-x86_64-ssl1.1.1.tar.gz +0 -0
- package/dist/deploy/pkg/nginx_binary/nginx-x86_64-ssl3.0.7.tar.gz +0 -0
- package/dist/deploy/script/common.sh +30 -1
- package/dist/deploy/script/install.sh +0 -44
- package/dist/deploy/script/nginx.sh +87 -5
- package/dist/deploy/script/prompt.sh +13 -1
- package/dist/deploy/script/upgrade.sh +0 -43
- package/dist/pack.js +8 -1
- package/dist/prepare.js +7 -1
- package/package.json +2 -2
- package/src/.release/release.conf.yaml +4 -1
- package/src/deploy/pkg/nginx_binary/compile.sh +37 -0
- package/src/deploy/pkg/nginx_binary/nginx-x86_64-ssl1.0.2.tar.gz +0 -0
- package/src/deploy/pkg/nginx_binary/nginx-x86_64-ssl1.1.1.tar.gz +0 -0
- package/src/deploy/pkg/nginx_binary/nginx-x86_64-ssl3.0.7.tar.gz +0 -0
- package/src/deploy/script/common.sh +30 -1
- package/src/deploy/script/install.sh +0 -44
- package/src/deploy/script/nginx.sh +87 -5
- package/src/deploy/script/prompt.sh +13 -1
- package/src/deploy/script/upgrade.sh +0 -43
- package/src/pack.ts +11 -2
- package/src/prepare.ts +12 -2
- package/dist/deploy/nginx/README.md +0 -1
- package/dist/deploy/nginx/pkg/nginx-x86_64-ssl1.0.2.tar.gz +0 -0
- package/dist/deploy/nginx/pkg/nginx-x86_64-ssl1.1.1.tar.gz +0 -0
- package/dist/deploy/nginx/pkg/nginx-x86_64-ssl3.0.7.tar.gz +0 -0
- package/dist/deploy/nginx/script/common.sh +0 -178
- package/dist/deploy/nginx/script/compile.sh +0 -11
- package/dist/deploy/nginx/script/fix.sh +0 -24
- package/dist/deploy/nginx/script/https.sh +0 -79
- package/dist/deploy/nginx/script/install.sh +0 -95
- package/dist/deploy/nginx/script/prompt.sh +0 -10
- package/dist/deploy/nginx/script/upgrade.sh +0 -7
- package/src/deploy/nginx/README.md +0 -1
- package/src/deploy/nginx/pkg/nginx-x86_64-ssl1.0.2.tar.gz +0 -0
- package/src/deploy/nginx/pkg/nginx-x86_64-ssl1.1.1.tar.gz +0 -0
- package/src/deploy/nginx/pkg/nginx-x86_64-ssl3.0.7.tar.gz +0 -0
- package/src/deploy/nginx/script/common.sh +0 -178
- package/src/deploy/nginx/script/compile.sh +0 -11
- package/src/deploy/nginx/script/fix.sh +0 -24
- package/src/deploy/nginx/script/https.sh +0 -79
- package/src/deploy/nginx/script/install.sh +0 -95
- package/src/deploy/nginx/script/prompt.sh +0 -10
- package/src/deploy/nginx/script/upgrade.sh +0 -7
- /package/dist/deploy/{nginx/pkg → pkg/nginx_binary}/nginx-arm-ssl1.1.1.tar.gz +0 -0
- /package/src/deploy/{nginx/pkg → pkg/nginx_binary}/nginx-arm-ssl1.1.1.tar.gz +0 -0
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# 获取脚本的父目录
|
|
3
|
-
project_path=$(echo "$basepath" | sed -e "s/\/script//")
|
|
4
|
-
|
|
5
|
-
execute_log_path="/var/log/nginx_script_execute_logs"
|
|
6
|
-
|
|
7
|
-
log() {
|
|
8
|
-
now=$(date "+%Y-%m-%d %H:%M:%S")
|
|
9
|
-
echo "$now: $1"
|
|
10
|
-
echo "$now: [info] $1" >>$execute_log_path
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
log_success() {
|
|
14
|
-
now=$(date "+%Y-%m-%d %H:%M:%S")
|
|
15
|
-
echo "$(tput setaf 2)""$now": "$1""$(tput sgr0)"
|
|
16
|
-
echo "$now: [success] $1" >>$execute_log_path
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
log_error() {
|
|
20
|
-
now=$(date "+%Y-%m-%d %H:%M:%S")
|
|
21
|
-
echo "$(tput setaf 1)""$now": "$1" "$(tput sgr0)"
|
|
22
|
-
echo "$now: [error] $1" >>$execute_log_path
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
source "$basepath"/prompt.sh
|
|
26
|
-
|
|
27
|
-
# 指定安装目录
|
|
28
|
-
install_path="$prefix/etc/nginx/"
|
|
29
|
-
|
|
30
|
-
mkdir -p "$install_path"
|
|
31
|
-
|
|
32
|
-
# 安装包所在路径
|
|
33
|
-
pkg_path="${project_path}/pkg"
|
|
34
|
-
|
|
35
|
-
# # 配置文件所在路径
|
|
36
|
-
# conf_path="${pkg_path}/conf/nginx.conf"
|
|
37
|
-
|
|
38
|
-
# # asset_path="$prefix/opt/posidon-frontend/"
|
|
39
|
-
# log_path="/var/log/nginx"
|
|
40
|
-
# log_file="nginx.log"
|
|
41
|
-
# pid_path="/var/run/nginx.pid"
|
|
42
|
-
|
|
43
|
-
# conf_version=$(awk '{print $1}' "${pkg_path}"/conf/version)
|
|
44
|
-
# echo $conf_version
|
|
45
|
-
|
|
46
|
-
# copy_conf_and_write_verison() {
|
|
47
|
-
# access_log_super="access_log /dev/stdout main"
|
|
48
|
-
# error_log_super="error_log /dev/stderr warn"
|
|
49
|
-
# access_log="access_log $log_path/$log_file main"
|
|
50
|
-
# error_log="error_log $log_path/$log_file"
|
|
51
|
-
|
|
52
|
-
# pid_file="pid $pid_path"
|
|
53
|
-
|
|
54
|
-
# exec=$(get_exec_path)
|
|
55
|
-
|
|
56
|
-
# if [ -f "${install_path}nginx.conf" ]; then
|
|
57
|
-
# old_version=$(sed -n '1p' "${install_path}"nginx.conf | sed 's/# version: //' | sed "s/\s\+//g")
|
|
58
|
-
|
|
59
|
-
# if [[ -n "${old_version}" ]]; then
|
|
60
|
-
# now=$(date "+%Y-%m-%d_%H:%M:%S")
|
|
61
|
-
|
|
62
|
-
# # echo "nginx_"$old_version"_"$now".conf"
|
|
63
|
-
# mv "${install_path}"nginx.conf "${install_path}"/nginx_"$old_version"_"$now".conf
|
|
64
|
-
# fi
|
|
65
|
-
# fi
|
|
66
|
-
|
|
67
|
-
# #nginx -v nginx代码内部使用的stderr输出, 此处需要转换为stdout
|
|
68
|
-
# nginx_version=$($exec -v 2>&1)
|
|
69
|
-
|
|
70
|
-
# cp "$conf_path" ./
|
|
71
|
-
|
|
72
|
-
# sed -i "1i\# ${nginx_version}" ./nginx.conf
|
|
73
|
-
# sed -i "1i\# version: ${conf_version}" ./nginx.conf
|
|
74
|
-
|
|
75
|
-
# if [[ -n "${prefix}" ]]; then
|
|
76
|
-
# n=$(grep -wn "mime.types" ./nginx.conf | awk -F: '{print $1}' | sed -n 1p)
|
|
77
|
-
# sed -i "${n}c include conf/mime.types;" ./nginx.conf
|
|
78
|
-
# fi
|
|
79
|
-
|
|
80
|
-
# # n=$(grep -wn "__root__" ./nginx.conf | awk -F: '{print $1}' | sed -n 1p)
|
|
81
|
-
# # if [[ -n "${n}" ]]; then
|
|
82
|
-
# # sed -i "${n}c root ${asset_path};" ./nginx.conf
|
|
83
|
-
# # fi
|
|
84
|
-
|
|
85
|
-
# # 替换日志输出路径方式
|
|
86
|
-
# n=$(grep -wn "#ERROR_LOG_PLACEHOLDER" ./nginx.conf | awk -F: '{print $1}' | sed -n 1p)
|
|
87
|
-
# if [[ -n "${n}" ]]; then
|
|
88
|
-
# if ((mode == 2)); then
|
|
89
|
-
# sed -i "${n}c ${error_log};" ./nginx.conf
|
|
90
|
-
# else
|
|
91
|
-
# sed -i "${n}c ${error_log_super};" ./nginx.conf
|
|
92
|
-
# fi
|
|
93
|
-
# fi
|
|
94
|
-
|
|
95
|
-
# n=$(grep -wn "#ACCESS_LOG_PLACEHOLDER" ./nginx.conf | awk -F: '{print $1}' | sed -n 1p)
|
|
96
|
-
# if [[ -n "${n}" ]]; then
|
|
97
|
-
# if ((mode == 2)); then
|
|
98
|
-
# sed -i "${n}c ${access_log};" ./nginx.conf
|
|
99
|
-
# else
|
|
100
|
-
# sed -i "${n}c ${access_log_super};" ./nginx.conf
|
|
101
|
-
# fi
|
|
102
|
-
# fi
|
|
103
|
-
|
|
104
|
-
# n=$(grep -wn "#PID_FILE_PALCEHOLDER" ./nginx.conf | awk -F: '{print $1}' | sed -n 1p)
|
|
105
|
-
# if [[ -n "${n}" ]]; then
|
|
106
|
-
# # 非supervisorctl
|
|
107
|
-
# if ((mode == 2)); then
|
|
108
|
-
# sed -i "${n}c ${pid_file};" ./nginx.conf
|
|
109
|
-
# fi
|
|
110
|
-
# fi
|
|
111
|
-
|
|
112
|
-
# n=$(grep -wn "daemon off;" ./nginx.conf | awk -F: '{print $1}' | sed -n 1p)
|
|
113
|
-
# if [[ -n "${n}" ]]; then
|
|
114
|
-
# # 非supervisorctl
|
|
115
|
-
# if ((mode == 2)); then
|
|
116
|
-
# sed -i "${n}c daemon on;" ./nginx.conf
|
|
117
|
-
# fi
|
|
118
|
-
# fi
|
|
119
|
-
|
|
120
|
-
# mv -fb "./nginx.conf" "$install_path"
|
|
121
|
-
|
|
122
|
-
# cp -fR "$pkg_path"/conf/ca "$install_path"
|
|
123
|
-
|
|
124
|
-
# mkdir -p /data/command/
|
|
125
|
-
# log "nginx start command: $exec -c ${install_path}nginx.conf"
|
|
126
|
-
# echo "$exec -c ${install_path}nginx.conf" >/data/command/nginx
|
|
127
|
-
|
|
128
|
-
# if [[ $? == 0 ]]; then
|
|
129
|
-
# log_success "$conf_version nginx.conf replaced successfully!"
|
|
130
|
-
# else
|
|
131
|
-
# log_error "$conf_version nginx.conf replaced failed!"
|
|
132
|
-
# fi
|
|
133
|
-
# }
|
|
134
|
-
|
|
135
|
-
# get_exec_path() {
|
|
136
|
-
# cmd=''
|
|
137
|
-
# if [[ -n "${prefix}" ]]; then
|
|
138
|
-
# cmd="${install_path}/sbin/nginx"
|
|
139
|
-
# else
|
|
140
|
-
# cmd="/usr/sbin/nginx"
|
|
141
|
-
# fi
|
|
142
|
-
|
|
143
|
-
# echo "$cmd"
|
|
144
|
-
# }
|
|
145
|
-
|
|
146
|
-
# get_exec_cmd() {
|
|
147
|
-
# exec=$(get_exec_path)
|
|
148
|
-
|
|
149
|
-
# echo "$exec -c ${install_path}nginx.conf"
|
|
150
|
-
# }
|
|
151
|
-
|
|
152
|
-
# add_service() {
|
|
153
|
-
# #添加到服务
|
|
154
|
-
# exec_cmd=$(get_exec_cmd)
|
|
155
|
-
# cp "$basepath"/../pkg/conf/nginx.service.tpl ./nginx.service
|
|
156
|
-
|
|
157
|
-
# conf_path="${install_path}nginx.conf"
|
|
158
|
-
# check_cmd="$exec -t -c $conf_path"
|
|
159
|
-
# version=$(echo "$conf_version" | grep -oP '\d+\.\d+\.\d+')
|
|
160
|
-
|
|
161
|
-
# sed -i "s#_exec_cmd_#$exec_cmd#g" ./nginx.service
|
|
162
|
-
# sed -i "s#_log_path_#$log_path#g" ./nginx.service
|
|
163
|
-
# sed -i "s#_log_file_#$log_file#g" ./nginx.service
|
|
164
|
-
# sed -i "s#_conf_path_#$conf_path#g" ./nginx.service
|
|
165
|
-
# sed -i "s#_version_#$version#g" ./nginx.service
|
|
166
|
-
# sed -i "s#_pid_file_#$pid_path#g" ./nginx.service
|
|
167
|
-
# sed -i "s#_start_check_#$check_cmd#g" ./nginx.service
|
|
168
|
-
|
|
169
|
-
# if ((mode == 2)); then
|
|
170
|
-
# # systemctl enable nginx
|
|
171
|
-
# cp ./nginx.service /usr/lib/systemd/system/
|
|
172
|
-
# systemctl daemon-reload
|
|
173
|
-
|
|
174
|
-
# log_success 'add nginx.service to /usr/lib/systemd/system/'
|
|
175
|
-
# else
|
|
176
|
-
# rm -rf /usr/lib/systemd/system/nginx.service
|
|
177
|
-
# fi
|
|
178
|
-
# }
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# see https://webhostinggeeks.com/howto/install-update-openssl-centos/
|
|
2
|
-
# serr https://blog.51cto.com/u_13890591/5686850
|
|
3
|
-
|
|
4
|
-
yum -y update
|
|
5
|
-
|
|
6
|
-
yum install -y make gcc perl-core pcre-devel wget zlib-devel
|
|
7
|
-
|
|
8
|
-
wget https://ftp.openssl.org/source/openssl-xxxk.tar.gz
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
./configure --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-stream --with-http_v2_module --with-openssl=/root/openssl-1.1.1f --prefix=/etc/nginx
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# 获取脚本所在的目录
|
|
3
|
-
basepath=$(dirname "$(realpath "${BASH_SOURCE[-1]}")")
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
source $basepath/common.sh
|
|
7
|
-
|
|
8
|
-
tar -zxvhf "$pkg_path"/nginx-binary*.tar.gz -C $install_path --strip-components 1
|
|
9
|
-
|
|
10
|
-
if [[ -z "${prefix}" ]]; then
|
|
11
|
-
cp "$install_path"/sbin/nginx /usr/sbin/
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
# 检测是否安装成功
|
|
15
|
-
if [[ $? == 0 ]]; then
|
|
16
|
-
echo "$(tput setaf 2)"nginx fixed"$(tput sgr0)"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"$install_path"nginx -v
|
|
20
|
-
|
|
21
|
-
else
|
|
22
|
-
|
|
23
|
-
echo "$(tput setaf 1)"nginx installation failed!"$(tput sgr0)"
|
|
24
|
-
fi
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
COUNTRY="CN"
|
|
4
|
-
PROVINCE="SC"
|
|
5
|
-
CITY="CD"
|
|
6
|
-
ORG="HX"
|
|
7
|
-
OU="HXWX"
|
|
8
|
-
emailAddress="hxwxgroup@qq.com"
|
|
9
|
-
|
|
10
|
-
get_subj () {
|
|
11
|
-
echo "/C=$COUNTRY/ST=$PROVINCE/L=$CITY/O=$ORG/OU=$OU/CN=$1/emailAddress=$emailAddress"
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if [ ! -f "/etc/pki/CA/index.txt" ]; then
|
|
15
|
-
touch /etc/pki/CA/index.txt
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
if [ ! -f "/etc/pki/CA/serial" ]; then
|
|
19
|
-
echo 01 >/etc/pki/CA/serial
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
# ca
|
|
23
|
-
echo "---------------------generate ca------------------"
|
|
24
|
-
openssl genrsa -des3 -out ca.key 4096
|
|
25
|
-
|
|
26
|
-
read -rep "Please input ca DOMAIN: " -i "HXWXGROUP" CA_GRPUP_DOMAIN
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
subj=$(get_subj $CA_GRPUP_DOMAIN)
|
|
30
|
-
|
|
31
|
-
openssl req -new -x509 -days 3650 -key ca.key -out ca.crt -subj $subj
|
|
32
|
-
|
|
33
|
-
if [[ $? == 0 ]]; then
|
|
34
|
-
echo "$(tput setaf 2)"---------------------generate ca done------------------!"$(tput sgr0)"
|
|
35
|
-
else
|
|
36
|
-
echo "$(tput setaf 1)"---------------------generate ca failed------------------"$(tput sgr0)"
|
|
37
|
-
exit 1
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
# 服务端
|
|
41
|
-
echo "---------------------generate server ca------------------"
|
|
42
|
-
openssl genrsa -des3 -out server.pem 2048
|
|
43
|
-
|
|
44
|
-
openssl rsa -in server.pem -out server.key
|
|
45
|
-
|
|
46
|
-
read -rep "Please input server DOMAIN: " -i "www.cdsp.com" SERVER_DOMAIN
|
|
47
|
-
|
|
48
|
-
subj=$(get_subj $SERVER_DOMAIN)
|
|
49
|
-
# echo $subj #"/C=CN/ST=SC/L=CD/O=HX/OU=HXWX/CN=www.cdsp.com/emailAddress=''"
|
|
50
|
-
openssl req -new -key server.pem -out server.csr -subj $subj
|
|
51
|
-
|
|
52
|
-
if [[ $? == 0 ]]; then
|
|
53
|
-
openssl ca -policy policy_anything -days 3650 -cert ca.crt -keyfile ca.key -in server.csr -out server.crt
|
|
54
|
-
echo "$(tput setaf 2)"---------------------generate server ca done------------------!"$(tput sgr0)"
|
|
55
|
-
else
|
|
56
|
-
echo "$(tput setaf 1)"---------------------generate server ca failed------------------"$(tput sgr0)"
|
|
57
|
-
exit 1
|
|
58
|
-
fi
|
|
59
|
-
|
|
60
|
-
# 客户端
|
|
61
|
-
echo "---------------------generate client ca------------------"
|
|
62
|
-
openssl genrsa -des3 -out client.pem 2048
|
|
63
|
-
|
|
64
|
-
read -rep "Please input client DOMAIN: " -i "HXWXcdspCLIENT" CLIENT_DOMAIN
|
|
65
|
-
|
|
66
|
-
subj=$(get_subj $CLIENT_DOMAIN)
|
|
67
|
-
|
|
68
|
-
openssl req -new -key client.pem -out client.csr -subj $subj
|
|
69
|
-
|
|
70
|
-
if [[ $? == 0 ]]; then
|
|
71
|
-
openssl ca -policy policy_anything -days 3650 -cert ca.crt -keyfile ca.key -in client.csr -out client.crt
|
|
72
|
-
|
|
73
|
-
openssl pkcs12 -export -clcerts -in client.crt -inkey client.pem -out client.p12
|
|
74
|
-
|
|
75
|
-
echo "$(tput setaf 2)"---------------------generate client ca done------------------!"$(tput sgr0)"
|
|
76
|
-
else
|
|
77
|
-
echo "$(tput setaf 1)"---------------------generate client ca failed------------------"$(tput sgr0)"
|
|
78
|
-
exit 1
|
|
79
|
-
fi
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# 获取脚本所在的目录
|
|
3
|
-
basepath=$(dirname "$(realpath "${BASH_SOURCE[-1]}")")
|
|
4
|
-
|
|
5
|
-
source "$basepath"/common.sh
|
|
6
|
-
|
|
7
|
-
open_port_80() {
|
|
8
|
-
# 查看防火墙是否开启
|
|
9
|
-
systemctl status firewalld
|
|
10
|
-
# 若未开启则开启
|
|
11
|
-
systemctl start firewalld
|
|
12
|
-
|
|
13
|
-
# 查看所有开启的端口
|
|
14
|
-
#firewall-cmd --list-ports
|
|
15
|
-
|
|
16
|
-
# 开启nginx默认80端口(关键步骤一)
|
|
17
|
-
firewall-cmd --zone=public --add-port=80/tcp --permanent
|
|
18
|
-
|
|
19
|
-
# 重启防火墙(关键步骤二)
|
|
20
|
-
firewall-cmd --reload
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
rpm_install() {
|
|
24
|
-
installed=$(rpm -qa | grep -i nginx)
|
|
25
|
-
|
|
26
|
-
if [[ -n "${installed}" ]]; then
|
|
27
|
-
rpm -e "$installed"
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
rpm -Uivh "$pkg_path"/nginx*.rpm
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
install_from_sourcecode() {
|
|
34
|
-
tar -zxvhf "$pkg_path/nginx-1.20.2.tar.gz"
|
|
35
|
-
(
|
|
36
|
-
cd ./nginx-1.20.2 || exit
|
|
37
|
-
sudo ./configure --prefix="$install_path" --with-http_ssl_module --with-http_v2_module
|
|
38
|
-
make && make install
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
# 安装
|
|
43
|
-
install() {
|
|
44
|
-
log "install nginx to path: ${install_path}"
|
|
45
|
-
|
|
46
|
-
arch=$(uname -m)
|
|
47
|
-
ssl_version=$(openssl version | grep -oP '\d+\.\d+' | sed -n '1p' 2>&1)
|
|
48
|
-
|
|
49
|
-
if [[ -z "${arch}" ]]; then
|
|
50
|
-
arch="x86_64"
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
if [[ $arch == arm* ]] || [[ $arch = aarch64 ]]; then
|
|
54
|
-
arch="arm"
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
if [[ "${ssl_version}" == "1.0" ]]; then
|
|
58
|
-
ssl_version="1.0.2"
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
if [[ "${ssl_version}" == "1.1" ]]; then
|
|
62
|
-
ssl_version="1.1.1"
|
|
63
|
-
fi
|
|
64
|
-
|
|
65
|
-
if [[ "${ssl_version}" == "3.0" ]]; then
|
|
66
|
-
ssl_version="3.0.7"
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
if [[ -z "${ssl_version}" ]]; then
|
|
70
|
-
ssl_version="1.0.2"
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
pkg="$pkg_path"/nginx-"$arch"-ssl"$ssl_version".tar.gz
|
|
74
|
-
|
|
75
|
-
if [ ! -f "$pkg" ]; then
|
|
76
|
-
log_error "Fatal error: nginx-$arch-ssl$ssl_version.tar.gz not matched! contact developer!"
|
|
77
|
-
exit 1
|
|
78
|
-
fi
|
|
79
|
-
|
|
80
|
-
log "current arch: $arch, current ssl_version: $ssl_version"
|
|
81
|
-
|
|
82
|
-
tar -zxvhf "$pkg" -C "$install_path" --strip-components 1
|
|
83
|
-
|
|
84
|
-
cp "$install_path"nginx /usr/sbin/
|
|
85
|
-
|
|
86
|
-
# 检测是否安装成功
|
|
87
|
-
if [[ $? == 0 ]]; then
|
|
88
|
-
log_success "nginx installation successfully!"
|
|
89
|
-
else
|
|
90
|
-
log_error "nginx installation failed!"
|
|
91
|
-
fi
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
install
|
|
95
|
-
log '------------- done ------------------------'
|
|
File without changes
|
|
File without changes
|