Stop or start BOINC daemon after boot

From BOINC

The advantage of installing BOINC as a daemon on Linux is that it automatically starts when Linux boots and it runs even when no users are logged on. You may, however, want to stop the daemon for some reason, restart the daemon after you stop it or prevent the daemon from autostarting at boot time. You will find the following commands helpful.

Linux (in general)

The "init" script which starts or stops the daemon is the same on any Linux distribution (including Ubuntu or Debian, or Fedora or Red Hat, or SUSE). It is used by the system at boot time or shutdown time to start or stop the daemon. You can use it directly from the command line to start or stop the daemon, or check the status. You must be root to run this script, so you must either login as root, use the 'sudo' command, or 'su' to root.

/etc/init.d/boinc-client start
- start BOINC client, running as a system daemon
/etc/init.d/boinc-client stop
- stop the BOINC daemon
/etc/init.d/boinc-client restart
- stop and start the BOINC daemon
/etc/init.d/boinc-client status
- report on status of the daemon (is it running or not?)

Fedora/Red Hat

Using the command line

In Fedora and Red Hat distributions and those based on Red Hat (like CentOS or Mandrake) you use the chkconfig command to turn a service (daemon) on or off at boot time. In addition to running the "init" script directly, as shown above, you can also use the service command to start or stop a daemon. Remember that you must be root to run these commands.

chkconfig boinc-client off
-tells Fedora to not start the daemon at boot time (but does not stop a running daemon)
chkconfig boinc-client on
-tells Fedora to start the daemon at boot time (but does not start the daemon immediately)
service boinc-client stop
-stops a running daemon
service boinc-client start
-starts the daemon
service boinc-client restart
-stops and then restarts the daemon

If you use sudo to run these commands you will need to give the full-path name of the command, which means /sbin/chkconfig or /sbin/service.

Using the GUI

The services GUI provides an easy way to turn the boinc-client service on or off (have it start or not start at boot time), start or stop the service after you have booted or just check if the service is running.

On Fedora 5 with KDE, click Applications -> Administration -> Server Settings -> Services. On Fedora 9 with KDE, click Applications -> Administration -> Service Management. Fedora 6, 7, 8 and 10 should be fairly similar to either Fedora 5 or 9.

Ubuntu/Debian

In Debian-based Linux distributions you use the update-rc.d command to turn a system service (daemon) on or off at boot time.

update-rc.d boinc-client defaults 98
-tells the system to start the BOINC client as a daemon at boot time
update-rc.d boinc-client remove
- tells the system not to start the BOINC client at boot time

See the man page for update-rc.d for more details.

Gentoo

In Gentoo-based Linux distributions you use the rc-update command to turn a system service (daemon) on or off at boot time.

rc-update add boinc-client default
-tells the system to start the BOINC client as a daemon at boot time (after networking support has been enabled)
rc-update del boinc-client
- tells the system not to start the BOINC client at boot time

See the man page for rc-update for more details.

SUSE Linux

In opensuse Linux distributions you use the insserv command to turn a system service (daemon) on or off at boot time.

insserv boinc-client
- tells the system to start the BOINC client as a daemon at boot time
insserv -r boinc-client
- removes the BOINC client from the list of services started at boot time

An init script for opensuse is available.