@wjwjq/release-helper 0.2.97 → 0.2.98
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.
|
@@ -81,7 +81,7 @@ Nginx has been installed, re-install it?[Y/N]n #
|
|
|
81
81
|
...
|
|
82
82
|
2024-06-28 14:57:39: nginx start command: /usr/sbin/nginx -c /opt/$APP_NAME$/nginx/nginx.conf
|
|
83
83
|
2024-06-28 14:57:39: $VERSION$ /opt/$APP_NAME$/nginx/nginx.conf replaced successfully!
|
|
84
|
-
2024-06-28 14:57:39: add $APP_NAME$.
|
|
84
|
+
2024-06-28 14:57:39: add $APP_NAME$.service to /usr/lib/systemd/system/
|
|
85
85
|
2024-06-28 14:57:39: /opt/$APP_NAME$/assets/settings
|
|
86
86
|
2024-06-28 14:57:39: $APP_NAME$ deployed successfully #安装成功
|
|
87
87
|
```
|
|
@@ -162,7 +162,7 @@ chmod +x upgrade.sh
|
|
|
162
162
|
...
|
|
163
163
|
2024-06-28 14:57:39: nginx start command: /usr/sbin/nginx -c /opt/$APP_NAME$/nginx/nginx.conf
|
|
164
164
|
2024-06-28 14:57:39: $VERSION$ /opt/$APP_NAME$/nginx/nginx.conf replaced successfully!
|
|
165
|
-
2024-06-28 14:57:39: add $APP_NAME$.
|
|
165
|
+
2024-06-28 14:57:39: add $APP_NAME$.service to /usr/lib/systemd/system/
|
|
166
166
|
2024-06-28 14:57:39: /opt/$APP_NAME$/assets/settings
|
|
167
167
|
2024-06-28 14:57:39: $APP_NAME$ deployed successfully #安装成功
|
|
168
168
|
```
|
|
@@ -185,7 +185,7 @@ chmod +x upgrade.sh
|
|
|
185
185
|
| 日志文件位置 | /var/log/$APP_NAME$/nginx.log |
|
|
186
186
|
| 系统静态资源目录 | /opt/$APP_NAME$/assets/ |
|
|
187
187
|
| 系统配置文件 | /opt/$APP_NAME$/assets/settings |
|
|
188
|
-
| system service位置 | /usr/lib/systemd/system/$APP_NAME$.
|
|
188
|
+
| system service位置 | /usr/lib/systemd/system/$APP_NAME$.service |
|
|
189
189
|
| 日志翻转配置位置 | /etc/logrotate.d/$APP_NAME$.nginx |
|
|
190
190
|
|
|
191
191
|
## 4.2 启动命令
|
|
@@ -209,7 +209,7 @@ supervisorctl start $APP_NAME$.nginx
|
|
|
209
209
|
需安装时选择 -cluster 模式
|
|
210
210
|
|
|
211
211
|
```bash
|
|
212
|
-
systemctl start $APP_NAME$.
|
|
212
|
+
systemctl start $APP_NAME$.service
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
## 4.3 验证
|
|
@@ -257,8 +257,8 @@ start() {
|
|
|
257
257
|
chmod 744 -R "$INSTALL_PATH"
|
|
258
258
|
|
|
259
259
|
if [[ $? == 0 ]]; then
|
|
260
|
-
log_success "
|
|
260
|
+
log_success "${APP_NAME} deployed successfully"
|
|
261
261
|
else
|
|
262
|
-
log_error "
|
|
262
|
+
log_error "${APP_NAME} deployment failed"
|
|
263
263
|
fi
|
|
264
264
|
}
|
|
@@ -161,12 +161,12 @@ add_nginx_service() {
|
|
|
161
161
|
|
|
162
162
|
if ((mode == 2)); then
|
|
163
163
|
# systemctl enable nginx
|
|
164
|
-
cp ./nginx.service /usr/lib/systemd/system/"$APP_NAME".
|
|
164
|
+
cp ./nginx.service /usr/lib/systemd/system/"$APP_NAME".service
|
|
165
165
|
systemctl daemon-reload
|
|
166
166
|
|
|
167
|
-
log_success "add ${APP_NAME}.
|
|
167
|
+
log_success "add ${APP_NAME}.service to /usr/lib/systemd/system/"
|
|
168
168
|
else
|
|
169
|
-
rm -rf /usr/lib/systemd/system/"$APP_NAME".
|
|
169
|
+
rm -rf /usr/lib/systemd/system/"$APP_NAME".service
|
|
170
170
|
fi
|
|
171
171
|
}
|
|
172
172
|
|
|
@@ -301,7 +301,8 @@ install_nginx_from_source(){
|
|
|
301
301
|
# 安装nginx可执行程序
|
|
302
302
|
install_nginx_binary() {
|
|
303
303
|
log "install nginx to path: ${NGINX_BINARY_INSTALL_PATH}"
|
|
304
|
-
|
|
304
|
+
mkdir -p $NGINX_BINARY_INSTALL_PATH
|
|
305
|
+
|
|
305
306
|
if [[ "${nginx_install_mode}" == "source" ]]; then
|
|
306
307
|
install_nginx_from_source
|
|
307
308
|
else
|