#!/bin/sh # # bind-config: install/uninstall named environment # case $1 in install) if [ -z "`getent group named`" ] ; then groupadd -g 25 named fi if [ -z "`getent passwd named`" ] ; then useradd -u 25 -g named -d /var/named -s /bin/false named passwd -l named fi ;; uninstall) if [ -n "`getent passwd named`" ] ; then userdel named fi if [ -n "`getent group named`" ] ; then groupdel named fi ;; *) echo "usage: `basename ${0}` [ install | uninstall ]" ;; esac # End of file