diff --git a/contrib/examples/pgsql/conf/pgsql.conf b/contrib/examples/pgsql/conf/pgsql.conf new file mode 100644 index 0000000..6ad5aac --- /dev/null +++ b/contrib/examples/pgsql/conf/pgsql.conf @@ -0,0 +1,17 @@ +# Kore pgsql_test configuration + +bind 127.0.0.1 8888 +pidfile kore.pid + +ssl_no_compression +load ./pgsql.so pgsql_load + +pgsql_conn_max 5 + +domain localhost { + certfile cert/server.crt + certkey cert/server.key + + accesslog kore_access.log + static / serve_pgsql_test +} diff --git a/contrib/examples/pgsql_test/pgsql_test.c b/contrib/examples/pgsql/src/pgsql.c similarity index 100% rename from contrib/examples/pgsql_test/pgsql_test.c rename to contrib/examples/pgsql/src/pgsql.c diff --git a/contrib/examples/pgsql_test/build.sh b/contrib/examples/pgsql_test/build.sh deleted file mode 100755 index 46a831f..0000000 --- a/contrib/examples/pgsql_test/build.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# -# Kore pgsql test module build directives. -# - -MODULE=pgsql_test.module -SOURCE_DIR=. -PGDIR=$(pg_config --includedir) -CC=gcc -CFLAGS="-I. -I/usr/local/include -I${PGDIR} \ - -Wall -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual \ - -Wsign-compare -g" - -OSNAME=$(uname -s | sed -e 's/[-_].*//g' | tr A-Z a-z) -if [ "${OSNAME}" = "darwin" ]; then - LDFLAGS="-dynamiclib -undefined suppress -flat_namespace" -else - LDFLAGS="-shared" -fi - -MODULE_BUILD_DATE=$(date +"%Y-%m-%d %H:%M:%S") - -### Begin building #### -echo "Building module ${MODULE}..." -rm -f ${MODULE} - -if [ ! -d .objs ]; then - mkdir .objs; -fi -rm -f .objs/* - -for src in `find ${SOURCE_DIR} -type f -name \*.c`; do - base=`basename $src`; - ${CC} ${CFLAGS} -fPIC -c $src -o .objs/${base}.o - if [ $? -ne 0 ]; then - echo "Build error, check above messages for clues."; - exit 1; - fi -done - -${CC} ${LDFLAGS} `find .objs -name \*.o -type f` -o ${MODULE} -echo "Building completed!" - -rm -rf .objs diff --git a/contrib/examples/pgsql_test/module.conf b/contrib/examples/pgsql_test/module.conf deleted file mode 100644 index 37fb63d..0000000 --- a/contrib/examples/pgsql_test/module.conf +++ /dev/null @@ -1,22 +0,0 @@ -# Kore pgsql_test configuration -# see modules/examples/module.conf for a better overview -# of what a configuration file has to offer and what different -# settings mean and do. - -bind 127.0.0.1 8081 -chroot /home/joris/src/kore -runas joris -workers 4 -pidfile kore.pid -load contrib/examples/pgsql_test/pgsql_test.module pgsql_load -ssl_no_compression - -pgsql_conn_max 5 - -domain localhost { - certfile cert/server.crt - certkey cert/server.key - accesslog kore_pgsql.log - - static / serve_pgsql_test -}