I’ve got switchtower set up, and it seems to work fine except for one
problem: It doesn’t successfully restart lighttpd. I have the
following task in my deploy.rb file:
desc “Restart the web server”
task :restart, :roles => :app do
sudo “/usr/local/etc/rc.d/lighttpd.sh restart”
This is on a FreeBSD system, so it’s using the rc script to restart
lighty. When I run rake deploy, I get the following messages:
[out :: hostname] Stopping lighttpd.
[out :: hostname] Waiting for PIDS: 778
[out :: hostname] .
[out :: hostname] Starting lighttpd.
However, when I try to connect to the server, it won’t connect, and a
ps confirms that lighty isn’t running. So I log into the server as
root, manually start it up, and it starts fine. I check the lighty
logs and there’s no error…so I think maybe switchtower disconnects
before the lighty startup process if finished? I’d really appreciate
some help…once I get switchtower to successfully restart lighty then
everything will be running smoothly.