disable jenkins autostart on ubuntu

4,960 views
Skip to first unread message

tomasz ducin

unread,
Dec 3, 2013, 7:20:16 AM12/3/13
to jenkins...@googlegroups.com

I've installed jenkins on my ubuntu 11.10 according to the official tutorial. Anyway, I don't want jenkins to autoload on startup. I want to star it manually only when I want to. And I don't know how to do that.

I've been searching for .bash* files, system settings->startup , /var/lib/jenkins directory and so on - but I didn't find any place I could disable jenkins autoload.

I'd grateful if someone could tell me how to switch jenkins autoload off. Thank you in advance.


--
best wishes
Tomasz Ducin

Mike Bayliss

unread,
Dec 3, 2013, 8:01:25 AM12/3/13
to jenkins...@googlegroups.com
update-rc.d jenkins disable


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Richard Lavoie

unread,
Dec 3, 2013, 8:04:35 AM12/3/13
to jenkins...@googlegroups.com
Did you take a look in /etc/default/ ? That's usually where the service options are defined in ubuntu.
--

Mark Waite

unread,
Dec 3, 2013, 10:41:20 AM12/3/13
to jenkins...@googlegroups.com
/etc/default/jenkins includes a RUN_STANDALONE value which defaults to "true".  If you set it to "false", then Jenkins will not start as a service.

Be sure you stop the service before marking it false (/etc/init.d/jenkins stop), otherwise the stop script will refuse to stop the service, because it is marked to not be started.

Mark Waite

tomasz ducin

unread,
Dec 3, 2013, 11:47:49 AM12/3/13
to jenkins...@googlegroups.com
Thank you guys very much! It was, in fact, ubuntu-related issue instead of jenkins-related.

cheers

Kelvin Olson

unread,
Jul 7, 2015, 10:25:33 AM7/7/15
to jenkins...@googlegroups.com
On Tuesday, December 3, 2013 at 9:41:20 AM UTC-6, Mark Waite wrote:
/etc/default/jenkins includes a RUN_STANDALONE value which defaults to "true".  If you set it to "false", then Jenkins will not start as a service.
 
While it's true that it won't start, I believe that re-configuration then means it will not easily start, because it no longer is configured to run on its own without being in some other container like JBoss or Tomcat.

And admittedly, some of these answers may be different from what I found simply due to changes in versions.

I'm on LMDE 17, and Jenkins ver. 1.565.3.

What I find is that sometimes I need to have this machine booted in a server-ish way (including Jenkins running), but most times I need it running in a workstation-ish way (i.e. Jenkins not running).
cat /etc/init/jenkins.conf
description "Jenkins Continuous Integration Server"
author "James Page <james...@ubuntu.com>"

start on runlevel [345]
stop on runlevel [!345]

...(snip)

That's my modification. Those two runlevel lists USED to be 2345. I asked my system "runlevel" and it said it was on runlevel 2.

So I modified runlevel 2 to not have server-ish things starting. Mostly, that was removing symlinks in /etc/rc2.d, but in the case of Jenkins, it was modifying the file you see above.

AND, I modified runlevel 4 to have some other server-ish things I wanted, by adding a couple links to /etc/rc4.d (exactly what these things were is not pertinent to this discussion).

Now, if I'm using this workstation, and find I need to fire up Jenkins, I can just "sudo telinit 4" and Jenkins starts up.

And, if I'm suffering from RAM starvation and swapping, and I want to shut off the server-ish stuff and go back to a lighter footprint, I just "sudo telinit 2" and Jenkins stops (as do some other things).

So far, it's been pretty painless. I hope that helps y'all.

Reply all
Reply to author
Forward
0 new messages