1

For example, vnStat has the following script instructions:

Usage: /etc/init.d/S32vnstat (start|stop|restart|check|kill|reconfigure)

What happens when I run /etc/init.d/S32vnstat reconfigure?

1 Answers1

3

Init scripts are individual to each package, but the convention is that "reconfigure" asks the daemon to re-read the configuration file of the service without interrupting the service provided by the daemon.

Under the hood this is usually implemented as

kill -HUP `cat /run/$PROGRAM.pid`

as sending a daemon a SIGHUP is the usual convention for asking a running daemon to reload its configuration file.

Many daemons cannot do hitless reconfiguration, and some init scripts simply stop && start the service instead, so don't rely upon the existence of the "reconfigure" option to positively imply a hitless reconfiguration feature.

vk5tu
  • 1,447
  • 15
  • 12
  • The convention for init.d scripts is that this action is called "reload", not "reconfigure". There is also the semi-standard "force-reload" which is supposed to mean reload the service even if it means it has to be restarted. The init script the OP is asking about is not following the convention. – Celada Feb 09 '15 at 07:33