refdb-init help
"Michael Strack" <[email protected]> Thu, 21 Mar 2019 18:20:26 +0800
| Newsgroups | gmane.text.refdb.general |
|---|---|
| Message-ID | <[email protected]> |
Trying to wrap up installation with the refdb-init script on and off
over the past couple of weeks, getting the following errors:
#+BEGIN_QUOTE
Saved existing refdbd configuration file as
/usr/local/etc/refdb/refdbdrc.201903191931.16
scripts/refdb-init: line 410: refdbdrc.example: No such file or directory
/usr/local/bin/refdbd: option requires an argument -- 'w'
unknown option w: use refdbd -h to display usage
Check for PostgreSQL authentication problems
refdbd-init.sh failed.
refdb-init is finished.
#+END_QUOTE
Environment:
- SVN version of refdb
- Debian
- Using PostgreSQL as back-end
First, the missing file. This may be because of the following code in
refdb-init (around line 410, as it said):
#+BEGIN_SRC
if [ "${engine_name}" = "mysql" ]; then
sed "s%<refdblib>%/usr/local/share/refdb%" < /usr/local/etc/refdb/refdbdrc.mysql.example | \
sed "s/\tlocalhost/\t${refdbdrc_hostname}/" | \
sed "s/\t3306/\t${refdbdrc_port}/">/usr/local/etc/refdb/refdbdrc \
|| endScript "Could not create refdbd config file" "failed"
elif [ "${engine_name}" = "pgsql" ]; then
sed "s%<refdblib>%/usr/local/share/refdb%" < refdbdrc.example | \
sed "s/\tlocalhost/\t${refdbdrc_hostname}/" | \
sed "s/\t5432/\t${refdbdrc_port}/" >/usr/local/etc/refdb/refdbdrc \
|| endScript "Could not create refdbd config file" "failed"
#+END_SRC
You can see that in the mysql case, the database-specific file
'refdbdrc.mysql.example' is used, while in the PostgreSQL case, the
non-existent generic file 'refdbdrc.example' is referenced. Perhaps
this should instead refer to 'refdbdrc.pgsql.example', which /does/
exist?
As for PostgreSQL authentication issues, the relevant call to refdbd
in refdb-init seems to be:
#+BEGIN_SRC
if [ "${engine_name}" = "pgsql" ]; then
su $postgres_name -c "$MYREFDBD -a -e 0 -l 6 -u $dbadmin_name -w $dbadmin_password" || endScript "Check for PostgreSQL authentication problems" "failed"
#+END_SRC
Have tested general functioning of PostgreSQL from shell and it seems
to work fine. The default PostgreSQL installation on Debian has a
single database admin and super user account, 'postgres', which is
locked. No password, can only be access by su/sudo. I figured since
I run refdb-init as root, this would be handled. So I just pass this
username and a blank password to refdb-init. But maybe I am required
to set a password for the admin account?
I've tried passing a blank (i.e. hitting RETURN), empty quotes (''),
an asterisk (*), a quoted asterisk ('*'). Sometimes this prompts for
password, sometimes it gives me "cannot open PID file"...