Use bash source

This commit is contained in:
Alexandre
2025-03-05 18:20:55 +01:00
parent 7e513ef0e4
commit c3771517c6
10 changed files with 20 additions and 20 deletions

View File

@@ -7,11 +7,11 @@ set -eu
# ALLOW RESTARTS #
##################
if [ -f /etc/cont-init.d/99-run.sh ]; then
if [[ "${BASH_SOURCE[0]}" == /etc/cont-init.d/* ]]; then
mkdir -p /etc/scripts-init
sed -i "s|/etc/cont-init.d|/etc/scripts-init|g" /ha_entrypoint.sh
sed -i "/ rm/d" /ha_entrypoint.sh
cp /etc/cont-init.d/99-run.sh /etc/scripts-init/
cp "${BASH_SOURCE[0]}" /etc/scripts-init/
fi
##############