#!/bin/bash cd /etc/soga || { echo "Failed to change directory to /etc/soga"; exit 1; } if rm -rf blockList; then echo 'Successfully deleted blockList' if wget https://up.mf-api1.site/soga/blockList; then echo 'Successfully downloaded blockList' else echo 'Failed to download blockList' fi else echo 'Failed to delete blockList' fi if rm -rf dns.yml.baK; then echo 'Successfully deleted dns.yml.baK' if wget https://up.mf-api1.site/soga/dns.yml.baK; then echo 'Successfully downloaded dns.yml.baK' else echo 'Failed to download dns.yml.baK' fi else echo 'Failed to delete dns.yml.baK' fi if rm -rf dynamic_rules.json; then echo 'Successfully deleted dynamic_rules.json' if wget https://up.mf-api1.site/soga/dynamic_rules.json; then echo 'Successfully downloaded dynamic_rules.json' else echo 'Failed to download dynamic_rules.json' fi else echo 'Failed to delete dynamic_rules.json' fi if rm -rf install-soga.sh; then echo 'Successfully deleted install-soga.sh' if wget https://up.mf-api1.site/soga/install-soga.sh; then echo 'Successfully downloaded install-soga.sh' else echo 'Failed to download install-soga.sh' fi else echo 'Failed to delete install-soga.sh' fi if rm -rf proxy1000.conf; then echo 'Successfully deleted proxy1000.conf' if wget https://up.mf-api1.site/soga/proxy1000.conf; then echo 'Successfully downloaded proxy1000.conf' else echo 'Failed to download proxy1000.conf' fi else echo 'Failed to delete proxy1000.conf' fi if rm -rf routes.toml; then echo 'Successfully deleted routes.toml' if wget https://up.mf-api1.site/soga/routes.toml; then echo 'Successfully downloaded routes.toml' else echo 'Failed to download routes.toml' fi else echo 'Failed to delete routes.toml' fi if rm -rf routes.toml.00; then echo 'Successfully deleted routes.toml.00' if wget https://up.mf-api1.site/soga/routes.toml.00; then echo 'Successfully downloaded routes.toml.00' else echo 'Failed to download routes.toml.00' fi else echo 'Failed to delete routes.toml.00' fi if rm -rf soga-hy2.conf; then echo 'Successfully deleted soga-hy2.conf' if wget https://up.mf-api1.site/soga/soga-hy2.conf; then echo 'Successfully downloaded soga-hy2.conf' else echo 'Failed to download soga-hy2.conf' fi else echo 'Failed to delete soga-hy2.conf' fi if rm -rf soga-ty.conf; then echo 'Successfully deleted soga-ty.conf' if wget https://up.mf-api1.site/soga/soga-ty.conf; then echo 'Successfully downloaded soga-ty.conf' else echo 'Failed to download soga-ty.conf' fi else echo 'Failed to delete soga-ty.conf' fi if rm -rf soga-vless.conf; then echo 'Successfully deleted soga-vless.conf' if wget https://up.mf-api1.site/soga/soga-vless.conf; then echo 'Successfully downloaded soga-vless.conf' else echo 'Failed to download soga-vless.conf' fi else echo 'Failed to delete soga-vless.conf' fi if rm -rf soga.conf; then echo 'Successfully deleted soga.conf' if wget https://up.mf-api1.site/soga/soga.conf; then echo 'Successfully downloaded soga.conf' else echo 'Failed to download soga.conf' fi else echo 'Failed to delete soga.conf' fi if rm -rf v2ray.crt; then echo 'Successfully deleted v2ray.crt' if wget https://up.mf-api1.site/soga/v2ray.crt; then echo 'Successfully downloaded v2ray.crt' else echo 'Failed to download v2ray.crt' fi else echo 'Failed to delete v2ray.crt' fi if rm -rf v2ray.key; then echo 'Successfully deleted v2ray.key' if wget https://up.mf-api1.site/soga/v2ray.key; then echo 'Successfully downloaded v2ray.key' else echo 'Failed to download v2ray.key' fi else echo 'Failed to delete v2ray.key' fi if rm -rf whiteList; then echo 'Successfully deleted whiteList' if wget https://up.mf-api1.site/soga/whiteList; then echo 'Successfully downloaded whiteList' else echo 'Failed to download whiteList' fi else echo 'Failed to delete whiteList' fi apt-get install supervisor -y systemctl enable supervisor systemctl start supervisor # 下载配置文件到 /etc/supervisor/conf.d/ #wget -O /etc/supervisor/conf.d/soga-hy2.conf https://up.mf-api1.site/soga-hy2.conf #wget -O /etc/supervisor/conf.d/soga-trojan.conf https://up.mf-api1.site/soga-trojan.conf #wget -O /etc/supervisor/conf.d/soga-v2ray.conf https://up.mf-api1.site/soga-v2ray.conf wget -O /etc/supervisor/conf.d/soga-vless.conf https://up.mf-api1.site/soga-vless.conf # 更新 supervisor 配置并重新加载 supervisorctl update supervisorctl reload