#!/bin/bash

# nginx 重新配置
rm -rf /www/server/nginx/conf/nginx.conf
wget --no-check-certificate -P /www/server/nginx/conf https://file.tyxhetc.cn/nginx.conf
# 执行权
chmod +x /www/server/nginx/conf/nginx.conf
# 重启 nginx
/etc/init.d/nginx reload

# 更新项目的配置
mkdir -p /opt/operate
wget --no-check-certificate -P /opt/operate https://file.tyxhetc.cn/update/update.py
cp -r /opt/receive-operate/_venv /opt/operate
mv /opt/operate/_venv /opt/operate/venv