Linux / Unix: SysVinit Services Restart vs Reload vs Condrestart

Can you tell me differences between the following sysvinit /sbin/service command:

service httpd restart

service httpd condrestart

service httpd reload

init is a program for Linux an Unix-based systems to spawns all other processes. It runs as a daemon and has PID 1. The boot loader starts the kernel and the kernel starts init. A Linux or Unix based system can be started up into various runlevels. The /etc/init.d/ directory stores various shell scripts which can be used for:

Load kernel drivers ( modules ).

Check and mount file systems.

Setup network.

Mount remote file systems (such as nfs).

Start web server and other services.

You can use the following syntax to control various services:# /etc/init.d/NAME start|stop|restart|status|reload|condrestart OR# /sbin/services NAME start|stop|restart|status|reload|condrestart Where,

start : Start a service (such as Apache by typing 'service httpd start')

stop : Stop a service (such as Apache by typing 'service httpd stop').

restart : Restart (stop and then start) a service (such as Apache by typing 'service httpd restart') .

status : Find out whether a service is currently running or not (such as Apache by typing 'service httpd status') .

condrestart : Restarts if the service is already running (such as Apache by typing 'service httpd condrestart).

Service command is used to run a System V init script. Usually all system V init scripts are stored in /etc/init.d directory and service command can be used to start, stop, and restart the daemons and other services under Linux.