Skip to content

Commit

Permalink
[feature] Add hotplug event to agent main loop #198
Browse files Browse the repository at this point in the history
Closes #198
  • Loading branch information
okraits committed Feb 26, 2024
1 parent 074d6a0 commit 59120d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ The agent sends the following
- After the previous configuration has been restored: ``config-restored``
- Before services are reloaded: ``pre-reload``
- After services have been reloaded: ``post-reload``
- After the agent has finished its check cycle, before going to sleep: ``end-of-cycle``
If a hotplug event is sent by *openwisp-config* then all scripts existing in
``/etc/hotplug.d/openwisp/`` will be executed. In scripts the type of event
Expand Down
1 change: 1 addition & 0 deletions openwisp-config/files/openwisp.agent
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ while true; do
if [ "$?" -eq "1" ]; then
update_configuration
fi
env -i ACTION="end-of-cycle" /sbin/hotplug-call openwisp

# handle SIGUSR1 to interrupt sleep
trap handle_sigusr1 USR1
Expand Down

0 comments on commit 59120d5

Please sign in to comment.