From a695e4d4f61afb91701efc6eaf08ca44eb230be9 Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Fri, 23 Jun 2023 14:02:21 -0300 Subject: rc-functions.sh: only delete env file if exists Signed-off-by: Anna (navi) Figueiredo Gomes --- sh/rc-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sh/rc-functions.sh') diff --git a/sh/rc-functions.sh b/sh/rc-functions.sh index 922bb870..2a60eaf8 100644 --- a/sh/rc-functions.sh +++ b/sh/rc-functions.sh @@ -140,7 +140,7 @@ save_variables() { local _envname if [ -n "${export_vars}" ]; then - rm "${RC_SVCDIR}/env/${RC_SVCNAME}" + [ -e "${RC_SVCDIR}/env/${RC_SVCNAME}" ] && rm "${RC_SVCDIR}/env/${RC_SVCNAME}" for _envname in ${export_vars}; do eval echo "${_envname}=\$${_envname}" >> "${RC_SVCDIR}/env/${RC_SVCNAME}" done -- cgit v1.2.3