code_junkie

Capistrano + thin + nginx with user not allowed to sudo howto?

Nov 11th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. someuser ALL=NOPASSWD: /etc/init.d/apache2
  2.  
  3. $ sudo ls
  4. [sudo] password for someuser:
  5. Sorry, user someuser is not allowed to execute '/bin/ls' as root on ...
  6.  
  7. namespace :deploy do
  8. desc "Start the Thin processes"
  9. task :start do
  10. run "cd #{current_path} && bundle exec sudo thin start -C /etc/thin/dankit.yml"
  11. end
  12.  
  13. desc "Stop the Thin processes"
  14. task :stop do
  15. run "cd #{current_path} && bundle exec sudo thin stop -C /etc/thin/dankit.yml"
  16. end
  17.  
  18. desc "Restart the Thin processes"
  19. task :restart do
  20. run "cd #{current_path} && bundle exec sudo thin restart -C /etc/thin/dankit.yml"
  21. end
  22.  
  23. end
  24.  
  25. namespace :deploy do
  26. desc "Start the Thin processes"
  27. task :start do
  28. run "cd #{current_path} && bundle exec sudo thin start -C /etc/thin/dankit.yml"
  29. end
  30.  
  31. desc "Stop the Thin processes"
  32. task :stop do
  33. run "cd #{current_path} && bundle exec sudo thin stop -C /etc/thin/dankit.yml"
  34. end
  35.  
  36. desc "Restart the Thin processes"
  37. task :restart do
  38. run "cd #{current_path} && bundle exec sudo thin restart -C /etc/thin/dankit.yml"
  39. end
  40.  
  41. end
Add Comment
Please, Sign In to add comment