]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Output test ports from the openresty-setup script
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 9 Nov 2024 14:57:36 +0000 (08:57 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 9 Nov 2024 14:58:44 +0000 (08:58 -0600)
scripts/ci/openresty-setup.sh

index 7d91fd4165428551da6f42a735d2b31acf0e4ab9..38631db5694afc3d4d76bb47af51f24c072c4732 100755 (executable)
@@ -23,6 +23,8 @@ LOGDIR="${BUILDDIR}/logs"
 CERTDIR="${BUILDDIR}/certs"
 CERTSRCDIR="${BASEDIR}/raddb/certs"
 PASSWORD="whatever"
+HTTP_PORT=8080
+HTTPS_PORT=8443
 
 # Important files for running openresty
 CONF="${BUILDDIR}/nginx.conf"
@@ -79,7 +81,7 @@ http {
     sendfile      on;
 
     server {
-        listen       8080;
+        listen       ${HTTP_PORT};
        server_name  localhost;
 
        location / {
@@ -103,7 +105,7 @@ http {
     }
 
     server {
-        listen       8443 ssl;
+        listen       ${HTTPS_PORT} ssl;
        server_name  localhost;
 
        ssl_certificate      ${CERTDIR}/server.pem;
@@ -163,4 +165,9 @@ cp "${CIDIR}/openresty/.htpasswd" "${BUILDDIR}"
 #
 echo "Starting openresty"
 openresty -c ${CONF} -p ${BUILDDIR}
-echo "Running openresty on port 8080 and 8443, accepting all local connections"
+echo "Running openresty on port ${HTTP_PORT} and ${HTTPS_PORT}, accepting all local connections"
+cat << EOF
+export REST_TEST_SERVER=127.0.0.1
+export REST_TEST_SERVER_PORT=${HTTP_PORT}
+export REST_TEST_SERVER_SSL_PORT=${HTTPS_PORT}
+EOF