Due to the way the while loop is designed, the container doesn't die when seahub dies. Thus, docker/k8s won't catch the error and can't recover. It seems to be a bug, because `wait $!` doesn't make any sense the way it's used.