Skip to content

Commit

Permalink
Remove zombie unicorn.sock
Browse files Browse the repository at this point in the history
  • Loading branch information
smeyfroi committed Jul 22, 2013
1 parent 1c00803 commit 882ba3d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/default/sv-unicorn-run.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ fi

if [ ! $RUNNING ]; then
echo "Starting unicorn"
rm /tmp/unicorn.sock # this sometimes gets left behind on reboot?
cd <%= @options[:app].path %>/current
# You need to daemonize the unicorn process, http://unicorn.bogomips.org/unicorn_rails_1.html
<%= node[:runit][:chpst_bin] %> \
<% if @options[:env_dir] %>-e <%= node[:runit][:sv_dir] %>/<%= @options[:app].application.name %>/env<% end %> \
-u <%= @options[:app].owner %>:<%= @options[:app].group %> \
Expand Down Expand Up @@ -71,7 +71,6 @@ trap unicorn_interrupted ALRM

echo "Waiting for current master to die. PID: ($CUR_PID)"
while [ -n "$(is_unicorn_alive $CUR_PID)" ]; do
/bin/echo -n '.'
sleep 2
done
echo "You've killed a unicorn!"

0 comments on commit 882ba3d

Please sign in to comment.