Comments (9)
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 sudoers
file so that the command won't prompt for a password (see NOPASSWD
).
from capistrano-foreman.
Yes, NOPASSWORD
is a solution.
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.
from capistrano-foreman.
I have the same problem. In fact, I think you should just use #{sudo} and use the global capistrano sudo setting.
from capistrano-foreman.
I'd really like to implement this, @mcfiredrill, but I can't find any documentation on a sudo
variable — could you direct me?
from capistrano-foreman.
from capistrano-foreman.
+1 since upstart supports user jobs and the newer session jobs, you can run upstart jobs without using sudo at all
from capistrano-foreman.
@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...
from capistrano-foreman.
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
from capistrano-foreman.
section Session Job:
[...] Session Jobs are not managed by Upstart running as PID 1 - they are managed by the users own Session Init.
section Session Init:
Traditionally, this job has been handled by applications such as "gnome-session" [...]
and then below in section Non-graphical Sessions:
However, what if you want to use a Session Init on a server? This is not fully supported right now, but can be achieved as follows.
Create two System Job similar to the following...
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.
from capistrano-foreman.
Related Issues (14)
- Facilitate for configuring the concurrency of each process
- Support Capistrano v3 HOT 3
- Make it work for init scripts
- Restart doesn't trigger new jobs HOT 2
- Undefined method to_sym when deploying HOT 3
- Broken when installing via Bundler HOT 1
- Concurrency
- RVM Sudo Error
- foreman is not part of the bundle. Add it to Gemfile
- Gem shouldn't be depending on capistrano-bundler HOT 2
- "Current" deploy directory for export HOT 2
- Scripts don't start automatically
- start/stop/restart one service HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capistrano-foreman.