#!/bin/sh
##
##  memcached-sasldb -- SASL database utilit
##

if [ $# -lt 1 ]; then
    echo "Usage: memcached-sasldb list"
    echo "Usage: memcached-sasldb passwd [options]"
fi

sasldb="@l_prefix@/etc/memcached/memcached.sasldb"

cmd="$1"
shift
case "$cmd" in
    list )
        exec @l_prefix@/sbin/sasldblistusers -f $sasldb
        ;;
    passwd )
        exec @l_prefix@/sbin/saslpasswd -f $sasldb -a memcached "$@"
        ;;
esac

