post_install() { groupadd jetty &> /dev/null useradd -g jetty -d /usr/share/jetty -s /bin/false jetty &> /dev/null chown -R jetty:jetty /usr/share/jetty chown -R jetty:jetty /var/log/jetty chown -R jetty:jetty /var/lib/jetty/webapps } post_upgrade(){ getent group jetty &> /dev/null || groupadd jetty &> /dev/null getent passwd jetty &> /dev/null || useradd -g jetty -d /usr/share/jetty -s /bin/false jetty &> /dev/null chown -R jetty:jetty /usr/share/jetty chown -R jetty:jetty /var/log/jetty chown -R jetty:jetty /var/lib/jetty/webapps } post_remove() { if getent passwd jetty &> /dev/null; then userdel jetty fi if getent group jetty &> /dev/null; then groupdel jetty fi }