post_install() { getent group colord 2>&1 > /dev/null || /usr/sbin/groupadd -g 71 colord getent passwd colord 2>&1 > /dev/null || /usr/sbin/useradd -u 71 -g colord -d /var/lib/colord -s /sbin/nologin -c "User for colord" colord chown -R colord:colord /var/lib/colord/ glib-compile-schemas /usr/share/glib-2.0/schemas &>/dev/null } post_upgrade() { #Remove after the merge of gnometesting / conflit with GID 997 systemd systemctl stop colord &>/dev/null getent passwd colord 2>&1 > /dev/null && /usr/sbin/userdel colord getent group colord 2>&1 > /dev/null && /usr/sbin/groupdel colord post_install } post_remove() { getent passwd colord 2>&1 > /dev/null && /usr/sbin/userdel colord getent group colord 2>&1 > /dev/null && /usr/sbin/groupdel colord glib-compile-schemas /usr/share/glib-2.0/schemas &>/dev/null } op=$1 shift $op $*