Fixed README
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user