litestream-ruby
litestream-ruby copied to clipboard
Support configuration of custom systemctl status command
I use systemd in production with litestream-ruby (on Hatchbox). When I check the status of Litestream in the litestream-ruby web ui, the status reported is "not running".
The reason this is happening is that built-in command for litestream-ruby to check the status of the litestream process returns an error message:
$ systemctl status litestream
Unit litestream.service could not be found.
On Hatchbox, I need to use a slightly different command to check the status:
$ systemctl --user status myapp-litestream.service
● myapp-litestream.service - myapp-litestream
Loaded: loaded (/home/deploy/.config/systemd/user/myapp-litestream.service; enabled; vendor preset: enabled)
Active: active (running) since Wed YYYY-MM-DD HH:MM:SS UTC; 20min ago
Main PID: <PID> (ruby)
# ...
To address this, the approach I had in mind is to make the systemctl status command configurable.