mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-13 22:20:59 +00:00
Fixed autoinstall.
This commit is contained in:
@@ -35,7 +35,8 @@ URL_TORRC="https://raw.githubusercontent.com/gSpotx2f/ruantiblock_openwrt/master
|
||||
CONFIG_DIR="${PREFIX}/etc/ruantiblock"
|
||||
USER_LISTS_DIR="${CONFIG_DIR}/user_lists"
|
||||
EXEC_DIR="${PREFIX}/usr/bin"
|
||||
BACKUP_DIR="${CONFIG_DIR}/autoinstall.bak.$(date +%s)"
|
||||
BACKUP_DIR_BASE="${CONFIG_DIR}/autoinstall.bak"
|
||||
BACKUP_DIR="${BACKUP_DIR_BASE}.$(date +%s)"
|
||||
### packages
|
||||
FILE_RUAB_PKG="${PKG_DIR}/ruantiblock_${RUAB_VERSION}_all.ipk"
|
||||
FILE_MOD_LUA_PKG="${PKG_DIR}/ruantiblock-mod-lua_${RUAB_MOD_LUA_VERSION}_all.ipk"
|
||||
@@ -120,7 +121,7 @@ BackupFile() {
|
||||
BackupCurrentConfig() {
|
||||
local _file
|
||||
MakeDir "$BACKUP_DIR"
|
||||
for _file in $(ls -1 "$CONFIG_DIR" | grep -v "$(basename $BACKUP_DIR)")
|
||||
for _file in $(ls -1 "$CONFIG_DIR" | grep -v "$(basename $BACKUP_DIR_BASE)*")
|
||||
do
|
||||
cp -af "${CONFIG_DIR}/${_file}" "${BACKUP_DIR}/${_file}"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user