fixed frontend look cases where lask_opk file could be removed after the instant action SIGUSR1 signal

This commit is contained in:
Vincent-FK 2021-06-19 00:58:41 +02:00
parent 5cd95016d9
commit 2ae4604084
1 changed files with 4 additions and 2 deletions

View File

@ -71,14 +71,16 @@ init_frontend() {
while true; do
# Check if frontend disable file is present
if [ -f "${DISABLE_FRONTEND_FILE}" ]; then
if [ -f "${DISABLE_FRONTEND_FILE}" -o -f "${REBOOTING_FILE}" ]; then
echo "${DISABLE_FRONTEND_FILE} file found, not starting frontend"
sleep 5
else
# Umount any remaining OPK, if any
umount /opk >/dev/null 2>&1
rm -f "${LAST_OPK_FILE}"
if [ -r "${LAST_OPK_FILE}" -a ! -f "${REBOOTING_FILE}" ]; then
rm "${LAST_OPK_FILE}"
fi
# Launch selected frontend
local frontend="$(get_frontend)"