post_install() {

  id turnserver &>/dev/null || \
    useradd -r -g daemon -d / -s /usr/bin/nologin turnserver

  install -dm 755 "/var/log/turnserver"
  chown -R turnserver:daemon /var/log/turnserver

  systemd-tmpfiles --create turnserver.conf

  echo "start server by issuing \"systemctl start turnserver.service\" or calling \"turnserver\""
}

post_upgrade() {
  post_install
}

pre_remove() {
  userdel turnserver
}
