2

I'm trying to disable apache2

$ sudo systemctl is-enabled apache2.service
apache2.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install is-enabled apache2
disabled

Here's its status:

$ sudo systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
   Active: active (running) since Fri 2016-03-04 21:37:01 ICT; 1 day 13h ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/apache2.service
           ├─ 1345 /usr/sbin/apache2 -k start
           ├─21367 /usr/sbin/apache2 -k start
           └─21368 /usr/sbin/apache2 -k start



$ sudo systemctl disable apache2.service
apache2.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install disable apache2
insserv: warning: current start runlevel(s) (empty) of script `apache2' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache2' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script `apache2' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache2' overrides LSB defaults (0 1 6).

And here's its status again

$ sudo systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
   Active: active (running) since Fri 2016-03-04 21:37:01 ICT; 1 day 13h ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/apache2.service
           ├─ 1345 /usr/sbin/apache2 -k start
           ├─21367 /usr/sbin/apache2 -k start
           └─21368 /usr/sbin/apache2 -k start

Mar 04 21:37:01 my-laptop apache2[709]: *
Mar 04 21:37:01 my-laptop systemd[1]: Started LSB: Apache2 web server.
Mar 05 00:15:32 my-laptop systemd[1]: Reloading LSB: Apache2 web server.
Mar 05 00:15:32 my-laptop apache2[10886]: * Reloading web server apache2
Mar 05 00:15:33 my-laptop apache2[10886]: *
Mar 05 00:15:33 my-laptop systemd[1]: Reloaded LSB: Apache2 web server.
Mar 06 00:14:11 my-laptop systemd[1]: Reloading LSB: Apache2 web server.
Mar 06 00:14:11 my-laptop apache2[21348]: * Reloading web server apache2
Mar 06 00:14:12 my-laptop apache2[21348]: *
Mar 06 00:14:12 my-laptop systemd[1]: Reloaded LSB: Apache2 web server.

Why can't I disable apache2 and how to do that?

  • Does the approach using update-rc.d as described in this post work for you? – Rocky Inde Jun 27 '16 at 6:40
  • Hi, there is certainly something that is not expected there, but it IS disabled, see the forth line starting from the first line formatted as code. – user10089632 Mar 12 '18 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.