문제

As part of my post-receive hook I checkout the HEAD of the repository and then run my start-up command.

So when I do git push it works fine.

Thing is, when i SSH into the box, I use byobu. Is there a way to get the post-receive hook to run my start-up command inside a byobu session, so that when I SSH in, I can see my app running?

도움이 되었습니까?

해결책

Byobu is just a wrapper around screen or tmux, so you want to send your command to one of those.

If you use tmux, you can just use the following command to litarally type in a command, then press enter, in the window number 2:

tmux send-keys -t 1 "start-app.sh" C-m

To set up byobu to use tmux, use either the command byobu-select-backend or start it with byobu-tmux.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top