修改备份config.toml文件名

原备份的文件名为config_backup.toml太过于通用,修改后的添加et_前缀用来确定是et的配置文件
This commit is contained in:
lazy
2025-03-26 22:24:11 +08:00
committed by GitHub
parent b0fb7a459d
commit 7adfc6b043
+6 -6
View File
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_VERSION:=2.2.4 PKG_VERSION:=2.2.4
PKG_RELEASE:= PKG_RELEASE:=1
LUCI_TITLE:=LuCI support for EasyTier LUCI_TITLE:=LuCI support for EasyTier
LUCI_DEPENDS:=+kmod-tun LUCI_DEPENDS:=+kmod-tun
@@ -23,9 +23,9 @@ if [ -f /etc/config/easytier ] ; then
mv -f /etc/config/easytier /tmp/easytier_backup mv -f /etc/config/easytier /tmp/easytier_backup
fi fi
if [ -f /etc/easytier/config.toml ] ; then if [ -f /etc/easytier/config.toml ] ; then
echo "备份easytier配置文件/etc/easytier/config.toml到/tmp/config_backup.toml" echo "备份easytier配置文件/etc/easytier/config.toml到/tmp/et_config_backup.toml"
echo "不重启设备之前再次安装luci-app-easytier 配置不丢失,不用重新配置" echo "不重启设备之前再次安装luci-app-easytier 配置不丢失,不用重新配置"
mv -f /etc/easytier/config.toml /tmp/config_backup.toml mv -f /etc/easytier/config.toml /tmp/et_config_backup.toml
fi fi
if [ -f /etc/easytier/et.db ] ; then if [ -f /etc/easytier/et.db ] ; then
echo "备份easytier数据库/etc/easytier/et.db到/tmp/et_backup.db" echo "备份easytier数据库/etc/easytier/et.db到/tmp/et_backup.db"
@@ -47,9 +47,9 @@ if [ -f /tmp/easytier_backup ] ; then
mv -f /tmp/easytier_backup /etc/config/easytier mv -f /tmp/easytier_backup /etc/config/easytier
echo "请前往 VPN - EasyTier 界面进行重启插件" echo "请前往 VPN - EasyTier 界面进行重启插件"
fi fi
if [ -f /tmp/config_backup.toml ] ; then if [ -f /tmp/et_config_backup.toml ] ; then
echo "发现easytier备份配置文件/tmp/config_backup.toml,开始恢复到/etc/easytier/config.toml" echo "发现easytier备份配置文件/tmp/et_config_backup.toml,开始恢复到/etc/easytier/config.toml"
mv -f /tmp/config_backup.toml /etc/easytier/config.toml mv -f /tmp/et_config_backup.toml /etc/easytier/config.toml
echo "请前往 VPN - EasyTier 界面进行重启插件" echo "请前往 VPN - EasyTier 界面进行重启插件"
fi fi
if [ -f /tmp/et_backup.db ] ; then if [ -f /tmp/et_backup.db ] ; then