1
0
angie-conv-image/image-entry.d/90-angie-config-test.sh
Konstantin Demin a0a4531501
refactor environment handling
also:
- drop "njs" directories (not actually used nor useful)
- rework jinja filters: more functions, shorter names, etc.
2024-07-23 00:02:19 +03:00

29 lines
505 B
Bash
Executable File

#!/bin/sh
set -f
. /image-entry.d/00-common.envsh
## Angie: unset core variable
unset ANGIE ANGIE_BPF_MAPS
## merely debug test
log_always 'test Angie configuration:'
log_always '========================='
angie -t
r=$?
log_always '========================='
## cleanup after test
rm -f "${volume_root}/angie.pid"
if [ $r = 0 ] ; then
log_always 'ready to run Angie'
else
log_always 'configuration test has failed, see above'
t=15
log_always "injecting delay for $t seconds"
sleep $t
fi
exit 0