#!/bin/sh
# description: auto_run
# 四川报告生成监控
# 检测脚本是否在运行，若已经在运行，则等待一段时间后再次检查，若未启动则进行启动
# echo "114.115.185.13 dfs" >>/etc/hosts
#echo "192.168.200.148 dfs" >>/etc/hosts     # 测试环境
echo "192.168.1.75 dfs" >>/etc/hosts       # 正式环境
echo "=========Service Will Start=========="
#    cd /data/lzc/scbg-python/SCBG-PYTHON && nohup gunicorn -c scbg_app_config.py app_run:app 2>&1 &
cd /opt/SCBG-PYTHON
exec nohup gunicorn -c scbg_app_config.py app_run:app 2>&1 &
sleep 10s
exec nohup python -u main_server.py >main_server.log 2>&1 &
echo "=========Service Start Completed!========"

