#!/bin/sh
#
# Sets password of the "scalix" user to the password provided as
# command line argument.
#
# Usage: sxpsql-setpwd <password>
#

# Pass "" to prevent implicit passing of $*
. /opt/scalix-postgres/bin/common-helpers.sh ""

echo "alter user scalix password '$1'" | \
    su - -c "$PGENGINE/psql -h $PSQL_DIR -p 5733 scalix" postgres \
    || exit $?

