capistrano-plugins / capistrano-unicorn-nginx

Capistrano tasks for automatic and sensible unicorn + nginx configuration
MIT License
175 stars 81 forks source link

`setup` task should be able to change config file #14

Closed bruno- closed 10 years ago

bruno- commented 10 years ago

Currently, invoking this plugin's setup task makes updates only the first time. On consequent setup invocations, config files are not updated.

IIRC this was done this way because I didn't know how to makes updates to the unicorn initializer file - task here. By repeatedly invoking that task, the initializer file is not updated (even though as a user I would expect an update). Update: see next comment

To keep all the setup tasks consistent, updates were disabled for all of them.

With proposed updates in #13, @rhomeister suggested config files should be update-able.

The simplest way to do that would be:

bruno- commented 10 years ago

I started investigating this and it turns out I had the wrong idea what is going on here this whole time.

I thought sudo update-rc.d -f unicorn_<appname>_production defaults creates some special files in /etc/rc<x>.d/ dirs, while in fact it only creates symlinks that point to the /etc/init.d/unicorn_<appname>_production script.

So actually - we're good here! All we need to do is this:

Sorry for this confusion here @rhomeister, feel free to open a PR whenever you want!

rhomeister commented 10 years ago

OK, I was confused as well. It worked perfectly without the guards and that is how I understood that the init.d files worked in Linux. ;) I'll get this done.