diff --git a/README.md b/README.md index 17edb25..de3b9c5 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,5 @@ 7) Run `opkg update && opkg install iptables-mod-extra coreutils-date` 8) Run `mkdir ~/limitator` 9) Run `crontab -e` and copy&paste contents in `crontab` file. -10) Reboot. \ No newline at end of file +10) Run `/etc/init.d/limitator enable` +11) Reboot. diff --git a/limitator b/limitator index fc1b517..4f21479 100644 --- a/limitator +++ b/limitator @@ -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_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(){ local used_bytes if [ -s "$USED_BYTES_FILE" ];then