fixquota with the /go/fixquota Command

/go/fixquota measures how much disk space and bandwidth each hosting account has used, and acts on the limits. For every account it: Afterwards it restarts the FTP server. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

/go/fixquota

Examples

# Recalculate usage and apply the limits
/go/fixquota

# See the saved numbers for every account
sqlite3 /var/lib/sqlite/site.db "SELECT Domain, SpaceUsed, DiskSpace, BandwidthUsed, Bandwidth, ExpiresOn FROM Site"

# Look at an account's FTP permission file
cat /etc/vsftpd/permission/example.com

Output

example.com Disk quota exceeded. disable FTP uploading...
Suspend other.com Web Hosting Expired.

Domain Space Bandwidth
example.com 1234567890 987654321
other.com 52428800 1048576

Message Meaning
<domain> Disk quota exceeded. disable FTP uploading... Disk use is at or over the quota. FTP uploads are switched off.
<domain> enable FTP uploading... Disk use is back under the quota, and uploads are switched on again.
Suspend <domain> Bandwidth Limit Exceeded. The bandwidth limit is reached. Nothing is suspended, because the suspend call is disabled in the script.
Suspend <domain> Web Hosting Expired. The hosting expiry date has passed, and the account is suspended.

The table at the end has one row per account. Space and Bandwidth are in bytes. The exit code is 0.

Logging

Every run is appended to /var/log/go/fixquota.log.

See the full reference at /go/fixquota and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *