Fixed README

This commit is contained in:
Eneko Nieto
2021-02-08 22:32:02 +01:00
parent a6188c7064
commit 12b8bdbc25
2 changed files with 2 additions and 8 deletions

View File

@@ -11,4 +11,5 @@
7) Run `opkg update && opkg install iptables-mod-extra coreutils-date` 7) Run `opkg update && opkg install iptables-mod-extra coreutils-date`
8) Run `mkdir ~/limitator` 8) Run `mkdir ~/limitator`
9) Run `crontab -e` and copy&paste contents in `crontab` file. 9) Run `crontab -e` and copy&paste contents in `crontab` file.
10) Reboot. 10) Run `/etc/init.d/limitator enable`
11) Reboot.

View File

@@ -26,13 +26,6 @@ config_get IPTABLES_FORWARD limitator iptables_forward 'forwarding_rule' # Name
config_get IPTABLES_INPUT limitator iptables_input 'input_rule' # Name of iptables rule for input. config_get IPTABLES_INPUT limitator iptables_input 'input_rule' # Name of iptables rule for input.
config_get IPTABLES_OUTPUT limitator iptables_output 'output_rule' # Name of iptables rule for output. config_get IPTABLES_OUTPUT limitator iptables_output 'output_rule' # Name of iptables rule for output.
check_environment(){
# Detect if iptables-mod-extra module is installed
[ -z "$(opkg info iptables-mod-extra|grep installed)" ] && echo "iptables-mod-extra module is not installed." && opkg update && opkg install iptables-mod-extra
# Detect if xt_quota module is loaded
[ -z "$(lsmod|grep xt_quota)" ] && echo "xt_quota module is not loaded" && modprobe xt_quota
}
get_saved_used_bytes(){ get_saved_used_bytes(){
local used_bytes local used_bytes
if [ -s "$USED_BYTES_FILE" ];then if [ -s "$USED_BYTES_FILE" ];then