What's new

[EDIT]Real-time Quota Monitoring (Download/Upload/Data Used)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I believe the problem occurs when the script tries to determine the IP address from the hostname. Without changing that GUI option, and if you haven't created a DHCP reservation for the host, it sends the request to the WAN DNS server which has no knowledge of a host called "RZYHGCJ00001973_JIDU6001".

Code:
# nslookup RZYHGCJ00001973_JIDU6001
Server:    8.8.8.8
Address 1: 8.8.8.8 dns.google

nslookup: can't resolve 'RZYHGCJ00001973_JIDU6001'

The script appears to be expecting you to be using localhost for your DNS (which was the default setting back in 2018), which is why it's grep'ing out that localhost line:
Code:
# nslookup zen
Server:    127.0.0.1
Address 1: 127.0.0.1 localhost.localdomain

Name:      zen
Address 1: 192.168.1.49 zen.home.lan
Yes, I have confirmed that the settings change fixes the problem (with that setting) without my script change. Thanks!

So now...if I want to make sure this runs automatically after boot and re-initializes the cap each day, can I just make a services-start script like this:
#!/bin/sh
sleep 60
/jffs/scripts/QuotaMonitor.sh reset
/jffs/scripts/QuotaMonitor.sh init
/jffs/scripts/QuotaMonitor.sh ip=auto
/jffs/scripts/QuotaMonitor.sh monitor interval=60 ulimit=2GB dlimit=2GB cap=100GB


...and then make a cron job that runs services-start each day at midnight?
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top