diff --git a/README.md b/README.md index e5c3056..1143163 100644 --- a/README.md +++ b/README.md @@ -523,6 +523,11 @@ time=YYYY-MM-DDTHH:MM:SS level=INFO msg="initialized db" path=/path/to/your/app/ time=YYYY-MM-DDTHH:MM:SS level=INFO msg="replicating to" name=s3 type=s3 sync-interval=1s bucket=mybkt path="" region=us-east-1 endpoint=http://localhost:9000 ``` +### Troubleshooting + +Some version of Linux don't install `ps`, you may need to install it in order to +leverage the Rails engine. + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. diff --git a/lib/litestream.rb b/lib/litestream.rb index 159faa9..6c4b7a0 100644 --- a/lib/litestream.rb +++ b/lib/litestream.rb @@ -164,7 +164,7 @@ def systemctl_info end def process_info - litestream_replicate_ps = `ps -ax | grep litestream | grep replicate` + litestream_replicate_ps = `ps -ef | grep litestream | grep replicate` exit_code = $?.exitstatus return unless exit_code.zero? diff --git a/test/test_litestream.rb b/test/test_litestream.rb index 5c1f41d..abb01c0 100644 --- a/test/test_litestream.rb +++ b/test/test_litestream.rb @@ -68,7 +68,7 @@ def test_replicate_process_ps stubbed_backticks = proc do |arg| case arg - when "ps -ax | grep litestream | grep replicate" + when "ps -ef | grep litestream | grep replicate" stubbed_ps_list when %(ps -o "state,lstart" 40364) stubbed_ps_status