Reputation:
I'm trying to get Jetty to auto start on my Ubuntu. I've done these commands:
cp /opt/jetty/bin/jetty.sh /etc/init.d
update-rc.d jetty.sh defaults
but when I run it I got a "Not starting jetty - NO_START=1 ".
Does anyone know why?
Secondly, the following is stated inside the jetty.sh.
# To get the service to restart correctly on reboot, uncomment below (3 lines):
# ========================
# chkconfig: 3 99 99
# description: Jetty 7 webserver
# processname: jetty
# ========================
What "3 lines" are they referring to? I uncommented
chkconfig: 3 99 99
description: Jetty 7 webserver
processname: jetty
but got an error too.
Upvotes: 6
Views: 7575
Reputation: 115
You can do this by commenting too. #NO_START=1
It can be easily done by following steps.
In terminal type sudo vi /etc/default/jetty
In the beginning you can see a line NO_START=1
Press Insert key on your keyboard, then you can go to insert mode.
In the bottom also you can see -INSERT- to make sure that you are in insert mode.
Comment the line, #NO_START=1
Press Esc to leave the escape mode.
then type the following to save your changes and to exit. :wq!
Now you can start.
Upvotes: 2
Reputation: 267020
By default, Jetty doesn't startup by itself.
You have to modify /etc/default/jetty6
(or whereever your config file is) and set:
no_start = 0
Upvotes: 7