From ce2454b9d524aee74d1df21c1d3a7a4cbdb80730 Mon Sep 17 00:00:00 2001 From: Seth L <81644108+sethAmazon@users.noreply.github.com> Date: Tue, 29 Nov 2022 11:01:28 -0500 Subject: [PATCH] Use Systemctl Command To Restart Agent (#645) --- packaging/dependencies/amazon-cloudwatch-agent-ctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/dependencies/amazon-cloudwatch-agent-ctl b/packaging/dependencies/amazon-cloudwatch-agent-ctl index 9535a447cc..f59877d9cd 100755 --- a/packaging/dependencies/amazon-cloudwatch-agent-ctl +++ b/packaging/dependencies/amazon-cloudwatch-agent-ctl @@ -96,7 +96,7 @@ agent_start() { if [ "${SYSTEMD}" = 'true' ]; then systemctl daemon-reload || return systemctl enable "${agent_name}.service" || return - service "${agent_name}" restart || return + systemctl restart "${agent_name}.service" || return else start "${agent_name}" || return sleep 1