commit 5d4dfcbf010358a22bcdd1b5696f71e86e44a8e2
parent 18c782f08b0fa42a818a4235c023b84a6f297a7c
Author: Cem Keylan <cem@ckyln.com>
Date: Wed, 16 Sep 2020 16:52:48 +0300
sysmgr: add -- to all rm calls
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sysmgr b/sysmgr
@@ -66,10 +66,10 @@ cleanup() {
# Clean the service run directory so that it can be restarted. Do not remove
# the run directory if lock file exists.
- rm -f "$RUNDIR/${service##*/}/pid" "${RUNDIR}/${service##*/}/syspid"
+ rm -f -- "$RUNDIR/${service##*/}/pid" "${RUNDIR}/${service##*/}/syspid"
[ -e "$RUNDIR/${service##*/}/lock" ] && return
- rm -rf "${RUNDIR:?}/${service##*/}"
+ rm -rf -- "${RUNDIR:?}/${service##*/}"
}
@@ -89,7 +89,7 @@ term() {
# Remove the RUNDIR so we can do a fresh start when we are re-initiating the
# program.
- rm -rf "${RUNDIR}"
+ rm -rf -- "${RUNDIR}"
exit 0
}
@@ -225,7 +225,7 @@ fn_svctl() {
kill -15 "$pid"
;;
up|start)
- checkprocess "$pid" || rm -rf "${RUNDIR:?}/$service" ;;
+ checkprocess "$pid" || rm -rf -- "${RUNDIR:?}/$service" ;;
once)
# This will place a lockfile upon start, so sysmgr will not
# attempt to restart it, if it goes down.