From 865331c084bea3b9fa8a94c994eaa157d8097edf Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Fri, 29 Apr 2022 10:08:28 +0200 Subject: [PATCH] fix(bin/emqx): ensure abs path /bin/bash to start emqx in systemd --- deploy/packages/emqx.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/packages/emqx.service b/deploy/packages/emqx.service index 29877674e..d505cc519 100644 --- a/deploy/packages/emqx.service +++ b/deploy/packages/emqx.service @@ -15,7 +15,7 @@ Environment=EMQX_LOG__TO=default # Start 'foregroun' but not 'start' (daemon) mode. # Because systemd monitor/restarts 'simple' services -ExecStart=/usr/bin/emqx foreground +ExecStart=/bin/bash /usr/bin/emqx foreground # Give EMQX enough file descriptors LimitNOFILE=1048576 @@ -23,7 +23,7 @@ LimitNOFILE=1048576 # ExecStop is commented out so systemd will send a SIGTERM when 'systemctl stop'. # SIGTERM is handled by EMQX and it then performs a graceful shutdown # It's better than command 'emqx stop' because it needs to ping the node -# ExecStop=/usr/bin/emqx stop +# ExecStop=/bin/bash /usr/bin/emqx stop # Wait long enough before force kill for graceful shutdown TimeoutStopSec=120s