dsxpt62448 2016-12-29 08:49
浏览 444

Golang:二进制更新后如何自动重启进程?

I built the golang app in local, then scp to server. I need to stop the process and restart manually. Is there any way to auto-restart the process when binary updated?

  • 写回答

3条回答 默认 最新

  • dongshiliao7990 2016-12-29 09:20
    关注

    Does it need to be sophisticated? You could have entr running and trigger an updater script when the binary changes.

    http://entrproject.org/

    e.g.

    echo 'binary_path' | entr script.sh &
    
    评论

报告相同问题?