PREIN
/bin/sh
getent group couchdb >/dev/null || groupadd -r couchdb getent passwd couchdb >/dev/null || \ useradd -r -g couchdb -d /var/lib/couchdb -s /bin/bash \ -c "Couchdb Database Server" couchdb exit 0
PREUN
/bin/sh
if [ $1 = 0 ] ; then /sbin/service couchdb stop >/dev/null 2>&1 /sbin/chkconfig --del couchdb fi
POSTIN
/bin/sh
/sbin/chkconfig --add couchdb