X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fwait-for-connection;h=b6c03a6705df9ef52f386e25fd2ff651f18fdd47;hb=ce8e200461ed777fb31a9d3c2f07c7e8c31b3b56;hp=67990f9f93bdb0f3e4cdd4842ee8afca8955bba8;hpb=d5dd12b8f8bc7d08813fee3e22831daf45c9052d;p=friendica.git diff --git a/bin/wait-for-connection b/bin/wait-for-connection index 67990f9f93..b6c03a6705 100755 --- a/bin/wait-for-connection +++ b/bin/wait-for-connection @@ -1,6 +1,29 @@ #!/usr/bin/php - . + * + * This script tries to connect to a database for a given interval + * Useful in case of installation e.g. to wait for the database to not generate unnecessary errors + * + * Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}] + */ + $timeout = 60; switch ($argc) { case 4: @@ -37,4 +60,4 @@ do { fwrite(STDOUT, '.'); } while (time() < $stopTime); fwrite(STDOUT, "\n"); -exit(1); \ No newline at end of file +exit(1);