-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not input sudo password when run foreman:restart #9
Comments
Hi @yesmeck, I'm not sure that will help. Capistrano isn't particularly great with input, so I think you will have to configure your |
Yes, But if I chang this line: run "sudo service #{options[:app]} start || sudo service #{options[:app]} restart" to run "#{foreman_sudo} service #{options[:app]} start || #{foreman_sudo} service #{options[:app]} restart" and set :foreman_sudo, "rvmsudo -p 'sudo password: '" Capistrano also will works. |
I have the same problem. In fact, I think you should just use #{sudo} and use the global capistrano sudo setting. |
I'd really like to implement this, @mcfiredrill, but I can't find any documentation on a |
+1 since upstart supports user jobs and the newer session jobs, you can run upstart jobs without using sudo at all |
@ralfthewise erm, user/session jobs only start when a user logs in and starts some sort of x session, no? i don't think upstart iterates all users of the system and loads their jobs... |
No, they're just like usual upstart jobs except they run in the context of an unprivileged user. See http://upstart.ubuntu.com/cookbook/#user-job and http://upstart.ubuntu.com/cookbook/#session-job |
section Session Job:
section Session Init:
and then below in section Non-graphical Sessions:
so, as i understand it, those jobs won't be started upon boot but only when the user actively initiates such a session by, e.g., launching gnome or some other tool which in turn only happens when you login. |
Hello, I'm using the master branch. When I run
foreman:restart
, capistrano will hang when prompting for sudo password.Should we use
foreman_sudo
here?https://github.com/hyperoslo/capistrano-foreman/blob/master/lib/capistrano/foreman.rb#L28
The text was updated successfully, but these errors were encountered: