. /usr/lib/lsb/init-functions

if ( cards list | grep shadow ) ; then \

  if ! (getent group rtkit > /dev/null 2>&1); then 
    groupadd -g 46 proftpd
  fi

  if ! (getent passwd rtkit > /dev/null 2>&1); then
    useradd -c proftpd -d /srv/ftp -g proftpd \
            -s /usr/bin/proftpdshell -u 46 proftpd
  fi
  install -v -d -m775 -o proftpd -g proftpd /srv/ftp
  ln -v -s -f /bin/false /usr/bin/proftpdshell

  if ! (grep 'proftpdshell' /etc/shells > /dev/null 2>&1); then
    echo /usr/bin/proftpdshell >> /etc/shells
  fi
fi

