summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLiam Crilly <liam.crilly@nginx.com>2022-12-19 15:03:55 +0000
committerLiam Crilly <liam.crilly@nginx.com>2022-12-19 15:03:55 +0000
commita2b399246217101277fb8fd8922f2717443e81a1 (patch)
treed5f779ef7d02f4ecdcbe794461b0eadde9499ea3
parent9c94cfccd58bbd78e5eac9d861dceb7c5fa9a6b7 (diff)
downloadunit-a2b399246217101277fb8fd8922f2717443e81a1.tar.gz
unit-a2b399246217101277fb8fd8922f2717443e81a1.tar.bz2
Tools: unitc avoid interactive rm(1) invocations.
-rwxr-xr-xtools/unitc6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/unitc b/tools/unitc
index 838f7ebf..bf12f111 100755
--- a/tools/unitc
+++ b/tools/unitc
@@ -161,7 +161,7 @@ if [ $REMOTE -eq 0 ]; then
# Cache the discovery for this unit PID (and cleanup any old files)
#
- rm /tmp/${0##*/}.* 2> /dev/null
+ rm -f /tmp/${0##*/}.* 2> /dev/null
echo UNIT_CTRL=\"${UNIT_CTRL}\" > /tmp/${0##*/}.$PID.env
echo ERROR_LOG=${ERROR_LOG} >> /tmp/${0##*/}.$PID.env
fi
@@ -221,11 +221,11 @@ if [ $CURL_STATUS -ne 0 ]; then
echo "${0##*/}: Check that you have permission to access the Unit control socket, or try again with sudo(8)"
else
echo "${0##*/}: Trying to access $UNIT_CTRL$URI"
- cat /tmp/${0##*/}.$$ && rm /tmp/${0##*/}.$$
+ cat /tmp/${0##*/}.$$ && rm -f /tmp/${0##*/}.$$
fi
exit 4
fi
-rm /tmp/${0##*/}.$$ 2> /dev/null
+rm -f /tmp/${0##*/}.$$ 2> /dev/null
if [ $SHOW_LOG -gt 0 ] && [ $NOLOG -eq 0 ] && [ $QUIET -eq 0 ]; then
echo -n "${0##*/}: Waiting for log..."