macOS ◆ xterm-256color ◆ zsh 1583 views

An example of using immortal to start and monitor a ruby unicorn app.

More unicorn workers are added by sending signal TTIN:

immortalctl -in <PID>

workers removed by sending TTOU

immortalctl -ou <PID>

immortalctl display the current status and change to the color yellow then immortal starts to follow the pid, this after sending a signal 2 (kill -USR2 PID)

immortalctl -2 <PID>

Via curl the socket show the amount of times service has been started “count” field and if is following the PID:

curl --unix-socket immortal.sock http:/status -s | jq

More by nbari

unicorn Signal handling 01:24

by nbari

Epazote basic 00:34

by nbari

See all