Permalink
Browse files

Add deploy user to the adm group.

This gives it access to /var/log/apache2, /var/log/mysql, among other
logs.
  • Loading branch information...
technicalpickles committed Jul 3, 2010
1 parent 6a2b54e commit 487ba496b110a538bfc0c055e982f9ff61c1f8cd
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/moonshine/scout.rb
View
@@ -35,6 +35,13 @@ def scout(options = {})
# provides iostat, needed for disk i/o plugin
package 'sysstat', :ensure => :installed, :before => package('scout')
+ # needed for MySQL Slow Queries to work
+ # add user to adm group, to be able to acces
+ # FIXME this seems to run EVERY time, regarless of the unless
+ exec "usermod -a -G adm #{configuration[:user]}",
+ :unless => "groups #{configuration[:rails]} | egrep '\\badm\\b'", # this could probably be more succintly and strongly specfied
+ :before => package('scout')
+
# needed for the rails plugin
gem 'elif', :before => package('scout')
gem 'request-log-analyzer', :ensure => :latest, :before => package('scout')

0 comments on commit 487ba49

Please sign in to comment.