mojolingo/asterisk-cookbook — pull request #5 by ziuchkovski (2013-11-10 00:58:59+00:00)
Title: User and path flexibility

This is another in the series of PRs I have. The primary goals of this PR are to support installation to a different bin prefix (/opt/asterisk-) and to run asterisk as a non-root user and group for security (asterisk/asterisk by default).

In order to do so, we have to put the init script under chef management, but that opens the potential to add runit/upstart/etc. support in the future.

Right now the init scripts are added as part of an 'init' recipe that's included at the end of the package and source recipes. This is kind of ugly. We have another changeset that inverts everything so that the 'default' recipe includes the config recipe, the package/source recipes according to an install_method attr, and the init config is added at the end.