You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/09/03 15:19:18 UTC
[trafficserver] branch 9.0.x updated: rc: fixes systemd unit file
stopping (#7157)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 061fe26 rc: fixes systemd unit file stopping (#7157)
061fe26 is described below
commit 061fe262e3ec1f85db7c23c37bd7a7214a84c90c
Author: Randall Meyer <rr...@apache.org>
AuthorDate: Wed Sep 2 12:48:27 2020 -0700
rc: fixes systemd unit file stopping (#7157)
In the ExecStopPost stanza of the unit file, an errant "}" made the lock
file never be deleted. Also the "-f" flag to rm always makes the
returncode 0 whether or not the file exists making the return code check
always return success.
Co-authored-by: Bryce Evans <bs...@apple.com>
(cherry picked from commit d036f41144b6e129ea5c812eec5ace74a073ff3f)
---
rc/trafficserver.service.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rc/trafficserver.service.in b/rc/trafficserver.service.in
index 4a993df..7aab848 100644
--- a/rc/trafficserver.service.in
+++ b/rc/trafficserver.service.in
@@ -27,8 +27,8 @@ Restart=on-failure
RestartSec=5s
LimitNOFILE=1000000
ExecStopPost=/bin/sh -c ' \
- export TM_PIDFILE=$(@exp_bindir@/traffic_layout} 2>/dev/null | grep RUNTIMEDIR | cut -d: -f2)/manager.lock ; \
- /bin/rm -f $TM_PIDFILE ; \
+ export TM_PIDFILE=$(@exp_bindir@/traffic_layout 2>/dev/null | grep RUNTIMEDIR | cut -d: -f2)/manager.lock ; \
+ /bin/rm $TM_PIDFILE ; \
if [[ $? -ne 0 ]]; then echo "ERROR: Unable to delete PID"; exit 1; fi'
TimeoutStopSec=5s
ExecReload=@exp_bindir@/traffic_ctl config reload