Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I have installed Jenkins using

sudo apt-get install jenkins

Now there is a new user called jenkins, and Jenkins is started when the computer starts. Is there a place I can put a shell script to start other services for this user as well? I have tried adding .bashrc and .profile to the home directory of the jenkins user (/var/lib/jenkins) with no luck.

share|improve this question
up vote 1 down vote accepted

Services are not designed to be launched trough .bashrc like files, but you have to configure them to be ran under the needed UID or username. It could be done in service configuration files, or sometimes in /etc/default/[service] config file, or /etc/init.d/[service] init script.

share|improve this answer
Thanks. In this case it seems to be in /etc/init/jenkins.conf, although there is also a script at /etc/init.d/jenkins – Alison Jul 24 '12 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.