fix: kanidm

This commit is contained in:
Patrick 2024-05-23 22:23:13 +02:00
parent fd792207d0
commit 41e8f1e2a2
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F

View file

@ -169,13 +169,16 @@
# Wait for the kanidm server to come online # Wait for the kanidm server to come online
count=0 count=0
main_pid_existed=false
while ! test -e /run/kanidmd/sock; do while ! test -e /run/kanidmd/sock; do
sleep 0.1 sleep 0.1
if [[ "$count" -eq 600 ]]; then if [[ "$count" -eq 600 ]]; then
echo "Tried for 60 seconds, giving up..." echo "Tried for 60 seconds, giving up..."
exit 1 exit 1
fi fi
if [[ ! -d "/proc/$MAINPID" ]]; then if [[ -d "/proc/$MAINPID" ]]; then
main_pid_existed=true
elif [[ "$main_pid_existed" == true ]]; then
echo "Main server died, giving up..." echo "Main server died, giving up..."
exit 1 exit 1
fi fi