Search code examples
varnishubuntu-server

get pidof varnish in Ubuntu


For keepalived I wan't to check if Varnish is running with pidof varnish however this does not output anything when I type it in the terminal.

I wan't to set it up als alternative to NGINX as shown in the following snippet:

vrrp_script chk_nginx {
    script "pidof nginx"
    interval 2
}

Solution

  • The correct command is:

    pidof varnishd