aboutsummaryrefslogtreecommitdiff
path: root/sh/rc-functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/rc-functions.sh')
-rw-r--r--sh/rc-functions.sh2
1 files changed, 1 insertions, 1 deletions
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