Lighttpd restart and force-reload commands

Solution 1:

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.

Solution 2:

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.