| src | Updated license | |
| .gitignore | First commit | |
| Cargo.lock | Updated license | |
| Cargo.toml | Updated license | |
| deny.toml | Updated license | |
| LICENSE | First commit | |
| notify.sh | Script change | |
| README.md | Updated license | |
spaceships-cert-status
Spaceships allows providing a TLS certificate when hosting a server but doesn't provide any way of automatically updating it. You instead need to manually update the certificate by using the cert command in the server console.
This program is intended to help create reminders to renew the certificate before it expires.
Usage
To get started spaceships-cert-status HOSTNAME, replacing HOSTNAME with the hostname of your server (this can't be an IP address).
The exit status and anything printed to stdout can be used by another program responsible for notifying the server admin. Here's the possible exit statuses with their respective output:
- 0: Connecting to the server was successful. Prints the number of days (rounded down) before the certificate expires.
- 1: Connecting to the server failed. Prints an error message.
- 2: Program exited before attempting to connect due to a command line argument error or printing the help text. Contents of stdout and stderr are unspecified.
This tool isn't limited to Spaceships. It can work with any QUIC server, though make sure you also specify the UDP port with the second argument.
Example
For an example of how to use this tool, see notify.sh which is a script I automatically run when my desktop starts up to produce a notification using notify-send.
Licensing
This tool is licensed under the GNU AGPLv3.