Foreman terminates immediately

后端 未结 3 526
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-06 03:35

I recently installed OSX and Ubuntu on different computers. I then attempted to install redis and foreman for both OS\'s. Both errors threw no flags, and seemed

3条回答
  •  甜味超标
    2021-02-06 03:46

    This one liner will kill any existing redis-servers and then start a new redis-server. When run in Foreman it doesn't send a SIGTERM which causes Foreman to quit, sending a SIGINT lets Foreman continue.

    (ps aux | grep 6379 | grep redis | awk '{ print $2 }' | xargs kill -s SIGINT) && redis-server

    In Procfile.dev:

    redis: (ps aux | grep 6379 | grep redis | awk '{ print $2 }' | xargs kill -s SIGINT) && redis-server

提交回复
热议问题