chore: Enhance grep and update readme

This commit is contained in:
sang 2025-02-10 15:36:27 +08:00 committed by Sang
parent 62965acbef
commit bf0374914e
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ Open `/usr/local/etc/lxc-iptag.conf` and change the config
| ------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| CIDR_LIST | `(192.168.0.0/16 100.64.0.0/10 10.0.0.0/8)` | IP filter list in CIDR format |
| LOOP_INTERVAL | `60` | Main loop interval(seconds) |
| FW_NET_INTERFACE_CHECK_INTERVAL | `60` | The interval(seconds) for using `ifconfig` to check lxc status changed (Set -1 to disable this feature) |
| FW_NET_INTERFACE_CHECK_INTERVAL | `60` | The interval(seconds) for using `ip link` to check lxc status changed (Set -1 to disable this feature) |
| LXC_STATUS_CHECK_INTERVAL | `-1` | The interval(seconds) for using `pct list` to check lxc status changed (Set -1 to disable this feature) |
| FORCE_UPDATE_INTERVAL | `1800` | The interval(seconds) for force check and update lxc tags |

View File

@ -82,7 +82,7 @@ lxc_status_changed() {
}
fw_net_interface_changed() {
current_net_interface=$(ip link | grep fw)
current_net_interface=$(ip link | grep "^[0-9]*: fw")
if [ "${last_net_interface}" == "${current_net_interface}" ]; then
return 1
else