Here is the full configuration file:

more /usr/local/lib/openser/openserctl/openserctl.pgsql
#
# $Id: openserctl.pgsql 1827 2007-03-12 15:22:53Z bogdan_iancu $
#
# sc: openser control; tool for maintaining openser
#
#===================================================================

##### ----------------------------------------------- #####
### PGSQL specific variables and functions
#

##### ----------------------------------------------- #####
### load SQL base
#
if [ -f "$MYLIBDIR/openserctl.sqlbase" ]; then
       . "$MYLIBDIR/openserctl.sqlbase"
else
       echo "Cannot load SQL core functions
'$MYLIBDIR/openserctl.sqlbase' - exiting ..."
       exit -1
fi

##### ----------------------------------------------- #####
### binaries
if [ -z "$PGSQL" ] ; then
       locate_tool psql
       if [ -z "$TOOLPATH" ] ; then
               echo "error: 'psql' tool not found: set PGSQL variable
to correct tool path"
               exit
       fi
       PGSQL="$TOOLPATH"'
fi

##### ----------------------------------------------- #####
### variables

# type of sql tables
if [ -z "$TABLE_TYPE" ]; then
       TABLE_TYPE=""
fi

# input: sql query, optional pgsql command-line params
pgsql_query() {
       # if password not yet queried, query it now
       prompt_pw "PgSql password for user '[EMAIL PROTECTED]'"
       mecho "pgsql_query: $PGSQL $2 -A -q -t -P fieldsep='    ' -h
$DBHOST -U $DBRWUSER $DBNAME -c '$1'
"
       PGPASSWORD="$DBRWPW" $PGSQL $2 \
               -A -q -t \
               -P fieldsep="   " \
               -h $DBHOST \
               -U $DBRWUSER \
               $DBNAME \
               -c "$1"
}

# input: sql query, optional pgsql command-line params
pgsql_ro_query() {
       mdbg "pgsql_ro_query: $PGSQL $2 -h $DBHOST -U $DBROUSER $DBNAME -c '$1'"
       PGPASSWORD="$DBROPW" $PGSQL $2 \
               -h $DBHOST \
               -U $DBROUSER \
               $DBNAME \
               -c "$1"
}

DBCMD=pgsql_query
DBROCMD=pgsql_ro_query
#DBRAWPARAMS="-A -q -t -P fieldsep=\"   \""
DBRAWPARAMS="-A -q -t"

thanks


On 3/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi
If I compiled openser with postgres module and I get the following errors:


[EMAIL PROTECTED]|~|16:34:34] /usr/local/sbin/openserctl moni

/usr/local/lib/openser/openserctl/openserctl.pgsql: line 57:
unexpected EOF while looking for matching `''
/usr/local/lib/openser/openserctl/openserctl.pgsql: line 70: syntax
error: unexpected end of file
database engine 'PGSQL' loaded
Control engine 'FIFO' loaded
ERROR: Error opening OpenSER's FIFO FIFO
ERROR: Make sure you have line 'fifo=FIFO' in your config


The line 57 3rd line in here:

# input: sql query, optional pgsql command-line params
pgsql_ro_query() {
    mdbg "pgsql_ro_query: $PGSQL $2 -h $DBHOST -U $DBROUSER $DBNAME -c '$1'"
    PGPASSWORD="$DBROPW" $PGSQL $2 \
        -h $DBHOST \
        -U $DBROUSER \
        $DBNAME \
        -c "$1"
}


How to fix this?
thanks


_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to