Extract branding before horizon starts

Move script to extract branding archive before
horizon service starts.

Closes-bug: 2002838

Test Plan:
PASS: Confirm branding file applied in pre-install in SX
PASS: Confirm branding file applied in post-install in SX
PASS: Confirm branding file applied in pre-install in DX
PASS: Confirm branding file applied in post-install in DX

Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: Ia36afd96493f1e15509607c706ca12d46466f741
This commit is contained in:
Takamasa Takenaka 2023-01-13 14:33:25 -03:00
parent 3e01c4ba04
commit b7f29b2136
2 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,5 @@
"""
Copyright (c) 2022 Wind River Systems, Inc.
Copyright (c) 2022-2023 Wind River Systems, Inc.
SPDX-License-Identifier: Apache-2.0
@ -9,7 +9,6 @@ import datetime
import fnmatch
import os
import resource
import subprocess
from django.conf import settings
@ -39,10 +38,6 @@ def worker_abort(worker):
pass
def when_ready(server):
subprocess.check_call(["/usr/bin/horizon-assets-compress"])
def post_worker_init(worker):
worker.nrq = 0
worker.restart = False

View File

@ -59,6 +59,9 @@ start()
rm -rf ${TMPUPLOADDIR}
mkdir -p ${TMPUPLOADDIR}
# extract branding file before server starts
/usr/bin/horizon-assets-compress
echo -n "Starting $DESC..."
start-stop-daemon --start --quiet --background --pidfile ${PIDFILE} \