#!/bin/bash
nohup java -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai -jar \
-Dnacos.server.grpc.port.offset=1 \
-Dspring.cloud.nacos.discovery.ip=172.192.13.95 \
/opt/ems/ruoyi-gateway/ruoyi-gateway.jar >> /var/log/ruoyi-gateway.log 2>&1 &
echo "ruoyi-gateway start! PID: $!"

nohup java -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai -jar \
-Dnacos.server.grpc.port.offset=1 \
-Dspring.cloud.nacos.discovery.ip=172.192.13.95 \
/opt/ems/ruoyi-auth/ruoyi-auth.jar >> /var/log/ruoyi-auth.log 2>&1 &
echo "ruoyi-auth start! PID: $!"

nohup java -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai -jar \
-Dnacos.server.grpc.port.offset=1 \
-Dspring.cloud.nacos.discovery.ip=172.192.13.95 \
/opt/ems/ruoyi-system/ruoyi-system.jar >> /var/log/ruoyi-auth.log 2>&1 &
echo "ruoyi-system start! PID: $!"

nohup java -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai -jar \
-Dnacos.server.grpc.port.offset=1 \
-Dspring.cloud.nacos.discovery.ip=172.192.13.95 \
/opt/ems/ems-dev-adapter/ems-dev-adapter.jar >> /var/log/ems-dev-adapter.log 2>&1 &
echo "ems-dev-adapter start! PID: $!"

nohup java -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai -jar \
-Dnacos.server.grpc.port.offset=1 \
-Dspring.cloud.nacos.discovery.ip=172.192.13.95 \
/opt/ems/ems-server/ems-server.jar >> /var/log/ems-erver.log 2>&1 &
echo "ems-server start! PID: $!"

tail -f /var/log/ems-erver.log