Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

What is the difference between the following

sudo /etc/init.d/lighttpd restart

and

/etc/init.d/lighttpd force-reload

?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

On my platform (ubutnu), I found that they are the same. Just looked the file and found:

case "$1" in

.... processing other options

;;
restart|force-reload)
  processing restart and force-reload options

For other services, it might be different.

share|improve this answer

This can also be achieved using Signals. See the Blogpost about Lighty's Angel for an overview of the Signals supported by lighttpd.

In short

  • SIGHUP leads to a graceful restart (config reloads)
  • SIGINT is graceful shutdown as now
  • all unhandled signals lead to a restart of the lighttpd process

The debian Policy Manual also explains the different parameters:

  • start
    start the service,

  • stop
    stop the service,

  • restart
    stop and restart the service if it's already running, otherwise start the service

  • reload
    cause the configuration of the service to be reloaded without actually stopping and restarting the service,

  • force-reload
    cause the configuration to be reloaded if the service supports this, otherwise restart the service.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.