<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">I'm having this weird issue where Varnish's init script is not creating the PID file on Debian 7, which makes it impossible to stop the server via the service command.</span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">~# service varnish stop</div><div style="font-family:arial,sans-serif;font-size:13px">[FAIL] Stopping HTTP accelerator: varnishd failed!</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Further inspection reveals the /var/run (symlink to /run) directory doesn't have the PID file in it when Varnish is running.</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">The init.d script I have is untouched; it comes from this installation:</div><div style="font-family:arial,sans-serif;font-size:13px"><a href="https://www.varnish-cache.org/installation/debian" target="_blank">https://www.varnish-cache.org/installation/debian</a><br>
</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">If you don't have the init script on hand, here's the line which is supposed to create the PID file:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">start-stop-demon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- -P ${PIDFILE} ${DAEMON_OPTS} > ${output} 2>&1;</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">This extrapolates to:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
start-stop-demon --start --quiet --pidfile /var/run/varnishd.pid --exec /usr/sbin/varnishd -- -P /var/run/varnishd.pid /usr/sbin/varnishd > $(/bin/tempfile -s.varnish) 2>&1;<br></div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Any help would be greatly appreciated.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
Etienne Levesque Guitard</div></div>