post_install() {
	# create group and user
	if ! getent group ympd &>/dev/null; then
		groupadd -r ympd >/dev/null
	fi
	if ! getent passwd ympd &>/dev/null; then
		useradd -r -c "ympd web-interface user" -d /var/empty -g ympd -s /bin/nologin ympd >/dev/null
	fi
}

post_upgrade() {
	post_install
}

post_remove() {
	if getent passwd ympd &>/dev/null; then
		userdel ympd >/dev/null
	fi
	if getent group ympd &>/dev/null; then
		groupdel ympd >/dev/null
	fi
}
