X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fwait-for-connection;h=de860e9849f59d62df7553d3eb68886201335419;hb=974f7bffc82d024a38b4709c6b250677a217f65a;hp=e73a98b077bab8d4d46a616b19d7e7d3aaaa42d1;hpb=e37b1c8794ed1ef329ba41e54e5f103fa6fecbaa;p=friendica.git diff --git a/bin/wait-for-connection b/bin/wait-for-connection index e73a98b077..de860e9849 100755 --- a/bin/wait-for-connection +++ b/bin/wait-for-connection @@ -1,14 +1,34 @@ #!/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}] */ +if (php_sapi_name() !== 'cli') { + header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); + exit(); +} + $timeout = 60; switch ($argc) { case 4: