Should I have it in
etc/openser/openser.cfg
OR?
etc/openser/openserctlrc
I get the same error if I have in either of the files. If I have it in
openser.cfg openser doesnt start. The message is syntax error where I
have this setting.
Do you know what I should do?
thanks
On 3/18/07, Berry Bartels <berry(a)praatpaal.com> wrote:
Make sure you have the following lines in your
configuration
fifo="/tmp/ser_fifo"
fifo_db_url="postgres://<username>:<password>@localhost/<database>"
Replace <username>,<password> and <database> with the right values.
Berry
-----Original Message-----
From: rkmr.em(a)gmail.com [mailto:rkmr.em@gmail.com]
Sent: zondag 18 maart 2007 4:23
To: berry(a)praatpaal.com
Cc: users(a)openser.org; devel(a)openser.org
Subject: Re: [Users] Re: openser + postgres starting problem
Thanks a lot. It worked.
This was from the latest 1.2 release from OpenSER. Maybe it should be
fixed there in the release?
I still get this error: Can you tell what I should do?
/usr/local/sbin/openserctl moni
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
thanks a lot
On 3/17/07, Berry Bartels <berry(a)praatpaal.com> wrote:
There was a ' to many on line 19
PGSQL="$TOOLPATH"' -> PGSQL="$TOOLPATH"
Try this one
#
# $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 '$DBRWUSER@$DBHOST'"
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"
Kind regards,
Berry Bartels
-----Original Message-----
From: users-bounces(a)openser.org [mailto:users-bounces@openser.org] On
Behalf
> Of rkmr.em(a)gmail.com
> Sent: zondag 18 maart 2007 0:23
> To: users(a)openser.org
> Subject: [Users] Re: openser + postgres starting problem
>
> 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 '$DBRWUSER@$DBHOST'"
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, rkmr.em(a)gmail.com <rkmr.em(a)gmail.com> wrote:
> Hi
> If I compiled openser with postgres module and I get the following
errors:
>
>
> [mark@localhost|~|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
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users(a)openser.org