Matthew Flaschen Asked: 2013-01-04 16:59:06 +0800 CST2013-01-04 16:59:06 +0800 CST 2013-01-04 16:59:06 +0800 CST How do I run a Debian init.d script manually, not at boot? 772 How do I stop an init.d server from running on boot, but still allow running it manually? debian 2 Answers Voted Michael Hampton 2013-01-04T17:00:32+08:002013-01-04T17:00:32+08:00 See the man page for update-rc.d. To stop a service from running at boot: update-rc.d -f servicename remove Or: update-rc.d servicename stop 20 2 3 4 5 . If you have Debian squeeze or later, or Ubuntu 12.10 or later: update-rc.d servicename disable To allow a service to run at boot: update-rc.d servicename defaults If you have Debian squeeze or later, or Ubuntu 12.10 or later: update-rc.d servicename enable To run the service manually: service servicename start service servicename restart To stop the service manually: service servicename stop Matthew Flaschen 2013-01-04T17:00:21+08:002013-01-04T17:00:21+08:00 On Debian Squeeze and up: sudo update-rc.d server-name disable To reverse: sudo update-rc.d server-name enable
See the man page for
update-rc.d
.To stop a service from running at boot:
Or:
If you have Debian squeeze or later, or Ubuntu 12.10 or later:
To allow a service to run at boot:
If you have Debian squeeze or later, or Ubuntu 12.10 or later:
To run the service manually:
To stop the service manually:
On Debian Squeeze and up:
To reverse: