litestream-ruby icon indicating copy to clipboard operation
litestream-ruby copied to clipboard

Support configuration of custom systemctl status command

Open rossta opened this issue 5 months ago • 1 comments

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".

Screenshot 2024-09-04 at 7 34 18 AM

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.

rossta avatar Sep 04 '24 11:09 rossta