PREIN
/bin/sh
# Create an UPS user /usr/share/rpm-helper/add-user nut $1 ups /var/state/ups /bin/false /usr/sbin/usermod -G dialout,tty,usb ups
PREUN
/bin/sh
# only do this if it is not an upgrade /usr/share/rpm-helper/del-service nut $1 upsmon
POSTIN
/bin/sh
/usr/share/rpm-helper/add-service nut $1 upsmon
POSTUN
/bin/sh
# Only do this if it is not an upgrade if [ ! -f /usr/sbin/upsd ]; then /usr/share/rpm-helper/del-user nut $1 ups fi