12 votes

Est-ce que systemctl daemon-reload est égal à systemctl restart service ?

J'ai un nom de service serviceA dans ubuntu16 et en même temps, c'est un démon.

Donc quand je fais systemctl daemon-reload comprend-elle l'action de systemctl restart serviceA ?

15voto

WinEunuuchs2Unix Points 91128

Non

En man systemctl (peut-être la plus longue page de manuel du monde) :

Manager Lifecycle Commands
   daemon-reload
       Reload the systemd manager configuration. This will rerun all generators (see
       systemd.generator(7)), reload all unit files, and recreate the entire
       dependency tree. While the daemon is being reloaded, all sockets systemd
       listens on behalf of user configuration will stay accessible.

       This command should not be confused with the reload command.

Il existe une distinction entre reload y restart

Unit Commands
   reload PATTERN...
       Asks all units listed on the command line to reload their configuration. Note
       that this will reload the service-specific configuration, not the unit
       configuration file of systemd. If you want systemd to reload the configuration
       file of a unit, use the daemon-reload command. In other words: for the example
       case of Apache, this will reload Apache's httpd.conf in the web server, not
       the apache.service systemd unit file.

       This command should not be confused with the daemon-reload command.

   restart PATTERN...
       Restart one or more units specified on the command line. If the units are not
       running yet, they will be started.

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X