win10 实现多个环境nacos和nginx 切换

背景 有个两套 nacos 和nginx 配置需要交替运行 实现bat 脚本切换

@echo off

rem ===================31 nacos conf============================
rmdir  d:\home
mklink /d d:\home d:\home_31
echo " =================== 31 nacos conf============================"

rem ===================31 nginx conf============================
rmdir  d:\openresty-1.19.9.1-win64\conf\nginx.conf.d
mklink /d d:\openresty-1.19.9.1-win64\conf\nginx.conf.d d:\openresty-1.19.9.1-win64\conf\nginx.conf.d_31
echo " =================== 31  nginx conf============================"

rem =================== 31 start nginx ============================
d:
taskkill /f /im nginx.exe >nul 2>nul
cd d:\openresty-1.19.9.1-win64
nginx.exe  
cmd
echo " =================== 31  nginx start ============================"
@echo end

@pause

posted @ 2022-06-28 15:34  vx_guanchaoguo0  阅读(56)  评论(0编辑  收藏  举报