Four new commands
0.4.0 came out a few hours after 0.3.0 and takes the plugin from 23 to 27 commands:
failedlists the systemd units that failed, or tells you there are none.healthsends one message with the disks at 85 % or more, the load against the number of CPUs, the memory in use, the failed units and the certificates that expire within 14 days.digestsends that summary now. With the newdigest:section it also arrives every day at the time you set.docker ps,docker restartanddocker logswork only on the containers you list indocker.allowed_containers.
Commands that wait for the plugin
Gotify does not resend stored messages to a client that connects later, so a command posted while Gotify was restarting used to be lost. On every new connection the plugin now reads the latest messages of the command app and runs the ones it has not taken yet, oldest first, if they are younger than replay_window (5 minutes by default; 0s turns it off).
The plugin remembers the last command it took before running it. A reboot is not run a second time when the machine comes back up. A command that is too old is answered with "Command expired, not executed".
A second look before a reboot
Confirmation is optional and off by default. List the commands in require_confirm, for example reboot, shutdown and stop, and the first message no longer runs them. The plugin answers with a random code, and only confirm <code> within 60 seconds runs the command. The code works once.
Two more limits arrive with this release. Commands sent as messages are limited to 20 per minute, and reboot, shutdown and the commands of a category marked as dangerous run one at a time. With enabled_commands you can keep only the commands you want; the rest answer "Command disabled by configuration".
Mac targets
A target marked with os: darwin now runs the macOS versions of free, top, ip, ports and connections. updates mac asks softwareupdate, and restart, stop, start and status of a Mac service all use its launchd label, so they agree with each other. logs reads the last lines of the macOS log of the service.
Upgrade
The build matrix is the same as 0.3.0: Gotify 3.1.1 and 2.9.1, on amd64, arm64 and armv7. No configuration change is needed; every new setting is optional.
The files and their checksums are in the downloads table of the gotify-commander page and on the v0.4.0 release page. The changelog lists every change.