#!/bin/bash

# 判断 Supervisor 管理器是否安装
if [ ! -d "/www/server/panel/plugin/supervisor/profile" ]; then
        echo -e "SUPERVISOR_NOT_INSTALL"
        exit;
else
	rm -rf /www/server/panel/plugin/supervisor/profile/*	
fi

# frpc 运维配置
wget --no-check-certificate -P /www/server/panel/plugin/supervisor/profile https://file.tyxhetc.cn/frpc-m.ini

# frpc 业务配置
wget --no-check-certificate -P /www/server/panel/plugin/supervisor/profile https://file.tyxhetc.cn/frpc-b.ini

# record 配置
wget --no-check-certificate -P /www/server/panel/plugin/supervisor/profile https://file.tyxhetc.cn/record.ini

# receptor-s 配置
wget --no-check-certificate -P /www/server/panel/plugin/supervisor/profile https://file.tyxhetc.cn/receptor-s.ini

# receptor-m 配置
wget --no-check-certificate -P /www/server/panel/plugin/supervisor/profile https://file.tyxhetc.cn/receptor-m.ini

# ETCP-lane2 配置
wget --no-check-certificate -P /www/server/panel/plugin/supervisor/profile https://file.tyxhetc.cn/ETCP-lane2.ini

# receive-operate 配置
wget --no-check-certificate -P /www/server/panel/plugin/supervisor/profile https://file.tyxhetc.cn/receive-operate.ini

# 重新启动
/www/server/panel/pyenv/bin/supervisorctl reload

