initial commit
This commit is contained in:
31
image-entry.d/90-angie-config-test.sh
Executable file
31
image-entry.d/90-angie-config-test.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
set -f
|
||||
|
||||
. /run/ngx/iep/00-common.envsh
|
||||
|
||||
## Angie: unset core variables
|
||||
unset ANGIE ANGIE_BPF_MAPS
|
||||
|
||||
## merely debug test
|
||||
log_always 'test Angie configuration:'
|
||||
log_always '========================='
|
||||
(
|
||||
exec 1>"${volume_root}/diag.angie.conf"
|
||||
angie -T
|
||||
)
|
||||
r=$?
|
||||
log_always '========================='
|
||||
|
||||
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
|
||||
|
||||
## cleanup after test
|
||||
rm -f "${volume_root}/angie.pid"
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user