Use systemctl instead of /etc/init.d/td-agent

Because td-agent3 supports systemd.

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-04-24 12:03:51 +09:00
parent cfda9dcaea
commit e3c6d9032f

View File

@ -4,16 +4,20 @@ class Fluentd
module Unix
def start
backup_running_config do
detached_command('/etc/init.d/td-agent start')
detached_command("systemctl start td-agent.service")
end
end
def stop
detached_command('/etc/init.d/td-agent stop')
detached_command("systemctl stop td-agent.service")
end
def restart
detached_command('/etc/init.d/td-agent restart')
detached_command("systemctl restart td-agent.service")
end
def reload
detached_command("systemctl reload td-agent.service")
end
end
end