diff --git a/README.md b/README.md index 29e824c..9cb364c 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ - 运行前请手动更改`.env`文件中的`CLASH_URL`变量值,否则无法正常运行。 - 默认将管理面板仅绑定到本机(`127.0.0.1:9090`),如需对外访问请在`.env`中自行配置并确保`CLASH_SECRET`足够复杂。 - 默认开启 TLS 证书校验,若确需跳过校验请在`.env`中设置`ALLOW_INSECURE_TLS=true`(不推荐)。 +- 如从旧版本升级,若存在 `/etc/profile.d/clash.sh` 请按需清理或改用新的 `/etc/profile.d/clash-for-linux.sh`。 + - 当前在RHEL系列和Debian系列Linux系统中测试过,其他系列可能需要适当修改脚本。 - 支持 x86_64/aarch64 平台 diff --git a/start.sh b/start.sh index 54e117d..667a546 100644 --- a/start.sh +++ b/start.sh @@ -248,6 +248,9 @@ fi echo '' # 添加环境变量(root权限) - 使用配置的端口 +if [ -f /etc/profile.d/clash.sh ]; then + echo -e "\033[33m[WARN] 检测到旧版环境变量文件 /etc/profile.d/clash.sh,建议确认是否需要清理\033[0m" +fi cat>/etc/profile.d/clash-for-linux.sh<