I just installed nginx on Ubuntu 16.04. The trouble is, I only want to start it manually, never automatically on runlevel.
I found lots of entries about how to get it to run on different runlevels, but not to prevent running on all of them.
So, I guessed and did this:
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
### END INIT INFO
Then:
/etc/init.d$ sudo update-rc.d nginx defaults
insserv: warning: current start runlevel(s) (2 3 4 5) of script `nginx' overrides LSB defaults (empty).
insserv: warning: current stop runlevel(s) (0 1 6) of script `nginx' overrides LSB defaults (0 1 2 3 4 5 6).
which looks to me like my changes didn't work.
How do I shut this off?
update-rc.d
is Upstart / SysVInit, and default 16.04 is SystemD, are you using SystemD for your init system, or the older ones?apt
/apt-get
), or did you install from source code (download the source code and compile)?