fluentd-ui/app/models/fluentd/agent/td_agent/unix.rb
Kenji Okimoto e3c6d9032f Use systemctl instead of /etc/init.d/td-agent
Because td-agent3 supports systemd.

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-05-22 10:11:25 +09:00

26 lines
522 B
Ruby

class Fluentd
class Agent
class TdAgent
module Unix
def start
backup_running_config do
detached_command("systemctl start td-agent.service")
end
end
def stop
detached_command("systemctl stop td-agent.service")
end
def restart
detached_command("systemctl restart td-agent.service")
end
def reload
detached_command("systemctl reload td-agent.service")
end
end
end
end
end