GoAdmio Command Line: checkssl with /go/checkssl

/go/checkssl checks the SSL certificate of every domain hosted on the server. For each domain it: A second mode, count, finds main domains whose certificate covers few names (or that have no certificate) and can install SSL for them in one run (see Count mode). Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Check every domain and send alerts if anything needs attention
/go/checkssl

Options

checkssl has no -- options. It reads two positional words:

Argument Required Default Notes
count No — Must be the first argument. Switches to Count mode.
--install No — Only has an effect together with count. Runs ssl for every domain the count lists.

Any other argument is ignored, apart from being written to the log.

Examples

# Full check, typically run on a schedule
/go/checkssl

[1/3] Checking example.com (63 days)...
[2/3] Checking shop.example.org (9 days)...
SSL Certificate Expiring in 9 Days (shop.example.org)
SSL Certificate not installed (old-site.net)

# Find main domains with a small or missing certificate
/go/checkssl count

[1] example.com (3) - Domains: example.com www.example.com go.example.com
[2] new-site.com (0) -

# Find them and install SSL for each one
/go/checkssl count --install

Output

The command prints one progress line per domain, in red for problems, and sends alerts when it finds any.

Situation Console output Alerted by email and WhatsApp
Certificate found, more than 14 days left [N/Total] Checking <domain> (<days> days)... No
14 days or fewer left SSL Certificate Expiring in <days> Days (<domain>) Yes
No Certbot certificate, HTTPS check fails SSL Certificate not installed (<domain>) Yes
No Certbot certificate, HTTPS check passes Can not verify SSL Certificate (<domain>) Yes
Certificate found, site returns no page SSL Installed but website not responding (<domain>) No
Certificate found, webmail. or go. returns no page SSL Not Installed for (webmail.<domain>) or (go.<domain>) No

Sites behind Cloudflare are not reported as "not responding", because the proxy’s answer is skipped.

Alerts

At the end of the run, one alert is sent through /go/sendmail and /go/sendwhatsapp:

Condition Alert subject Alert body
At least one priority domain (1 to 10 days left) SSL Certificate Checker (<n> Domains), category SSL Expiry Priority domains only.
No priority domains, but at least one error SSL Certificate Checker (<n> Domains), category SSL Checker Every error found.
Nothing found No alert —

[!NOTE]
When a priority domain exists, the alert lists only the priority domains. Other errors from the same run, such as a domain with no certificate, appear on the console but are not in that alert. They are reported in the next run that has no priority domains.

Exit status

Mode Exit status
Check all domains The status of the last command run, normally 0.
count and count --install Always 1, even when the list was printed correctly.

See the full reference at /go/checkssl 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 *