post_install() {
  if ! getent group memcached >/dev/null; then
    groupadd --system memcached
  fi
  if ! getent passwd memcached >/dev/null; then
    useradd --system -c 'memcached user' -g memcached -d / -s /bin/nologin memcached
  fi
}

post_upgrade() {
  post_install $1
  if (( $(vercmp $2 1.4.36-1) <= 0 )); then
	  usermod -s /bin/nologin memcached
  fi
}
