Export variable to bashrc

This commit is contained in:
Alexandre
2023-04-24 12:18:38 +02:00
parent 1545c8f6c6
commit a76d60808b
15 changed files with 54 additions and 11 deletions

View File

@@ -26,6 +26,7 @@ if [ -n "${RC_SVCNAME}" ]; then
if /etc/init.d/"${RC_SVCNAME}" --quiet status ; then
export IN_BACKGROUND=true
if [ -d /var/run/s6/container_environment ]; then printf "%s" "true" > /var/run/s6/container_environment/IN_BACKGROUND; fi
if [ -f ~/.bashrc ]; then printf "%s" "IN_BACKGROUND=\"true\"" >> ~/.bashrc; fi
/etc/init.d/"${RC_SVCNAME}" --quiet stop
fi
fi

View File

@@ -79,6 +79,7 @@ if [ -n "${RC_SVCNAME}" ]; then
if ! /etc/init.d/"${RC_SVCNAME}" --quiet status ; then
export IN_BACKGROUND=true
if [ -d /var/run/s6/container_environment ]; then printf "%s" "true" > /var/run/s6/container_environment/IN_BACKGROUND; fi
if [ -f ~/.bashrc ]; then printf "%s" "IN_BACKGROUND=\"true\"" >> ~/.bashrc; fi
/etc/init.d/${RC_SVCNAME} --quiet start
fi
fi