Don't change BASEURL again on container restart
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2021-08-25 00:35:05 +02:00
parent 4fd4fb01b4
commit 234ce066cf

View File

@ -1,6 +1,6 @@
#!/bin/sh
CURRENT_BASE="/"
[ -s /chbase-done ] && CURRENT_BASE=$(cat /chbase-done) || CURRENT_BASE="/"
[ -n "${BASEURL}" ] || BASEURL="/"
run() {
@ -21,6 +21,9 @@ run() {
fi
}
[ "${CURRENT_BASE}" != "${BASEURL}"] && run "${BASEURL}" /srv/htdocs-frontend
[ "${CURRENT_BASE}" != "${BASEURL}"] && {
run "${BASEURL}" /srv/htdocs-frontend
echo "${BASEURL}" > /chbase-done
}
exec /srv/frontend $@