commit e0a39dbf37b1a4c31fcce052971beb30e45830e8
parent 4f16adf8238b5ceab67d11caf6f80598fb418530
Author: Cem Keylan <cem@ckyln.com>
Date: Tue, 7 Jul 2020 15:43:33 +0300
sysmgr: do remove pid and syspid when services go down
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sysmgr b/sysmgr
@@ -66,7 +66,9 @@ cleanup() {
# Clean the service run directory so that it can be restarted. Do not remove
# the run directory if lock file exists.
- [ -e "${RUNDIR:?}/${service##*/}/lock" ] && return 0
+ rm -f "${RUNDIR}/${service##*/}/pid" "${RUNDIR}/${service##*/}/syspid"
+
+ [ -e "${RUNDIR:?}/${service##*/}/lock" ] && return
rm -rf "${RUNDIR:?}/${service##*/}"
}