Що робить “systemctl перезавантаження демонів”?


46

У мене є служба, яка раптово зупинилася. Я намагався перезапустити цю службу, але не вдався і попросив запустити "systemctl daemon-reload".

Що це саме робити? Що таке "перезавантаження демона"?

Відповіді:


47

людина systemctl каже:

   daemon-reload
       Reload 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.

Отже, це по суті "м'яке" перезавантаження; прийняття змінених конфігурацій з файлової системи та відновлення дерев залежностей .

Отже, systemd.generatorзазначено:

Генератори - це невеликі бінарні файли, які живуть у / usr / lib / systemd / user-generator / та інших каталогах, перелічених вище. systemd (1) виконує ці двійкові файли дуже рано під час завантаження та під час перезавантаження конфігурації - до завантаження одиничних файлів. Генератори можуть динамічно генерувати одиничні файли або створювати символьні посилання на одиничні файли для додавання додаткових залежностей, розширюючи або переосмислюючи існуючі визначення. Їх головне призначення - динамічно перетворювати файли конфігурації, які не є власними файлами одиничних модулів, у файли власних одиниць.

   Generators are loaded from a set of paths determined during compilation, listed above. System and user
   generators are loaded from directories with names ending in system-generators/ and user-generators/,
   respectively. Generators found in directories listed earlier override the ones with the same name in
   directories lower in the list. A symlink to /dev/null or an empty file can be used to mask a generator,
   thereby preventing it from running. Please note that the order of the two directories with the highest
   priority is reversed with respect to the unit load path and generators in /run overwrite those in /etc.

   After installing new generators or updating the configuration, systemctl daemon-reload may be executed. This
   will delete the previous configuration created by generators, re-run all generators, and cause systemd to
   reload units from disk. See systemctl(1) for more information.
Використовуючи наш веб-сайт, ви визнаєте, що прочитали та зрозуміли наші Політику щодо файлів cookie та Політику конфіденційності.
Licensed under cc by-sa 3.0 with attribution required.