Skip to content
Snippets Groups Projects
Commit f18f5378 authored by Thomas Bellman's avatar Thomas Bellman
Browse files

Add class for reloading systemd.

This adds the class 'systemd::daemon_reload', which can be used
to tell systemd to re-read its service configuration files.
parent f11e58cb
No related branches found
No related tags found
No related merge requests found
# Copyright © 2021 Thomas Bellman, Linköping, Sweden
# Licensed under the GNU LGPL v3+; see the README file for more information.
/*
* Tell systemd to re-read its service configuration files.
*
* If you change any systemd service configuration files, you should
* include and notify this class. Example:
*
* include systemd::daemon_reload
* file {
* '/etc/systemd/system/foo.service.d/bar.conf':
* ensure => absent,
* notify => Class['systemd::daemon_reload'];
* }
*/
class systemd::daemon_reload
{
exec {
'systemd::daemon_reload::do-reload':
command => 'systemctl daemon-reload',
path => [ '/bin', '/usr/bin', '/sbin', '/usr/sbin', ],
refreshonly => true;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment