PREUN
/bin/sh
/usr/share/rpm-helper/del-service zoneminder $1 zoneminder
POSTIN
/bin/sh
/usr/bin/systemd-tmpfiles --create zoneminder.conf
# Allow zoneminder access to local video sources, serial ports, and x10
/usr/bin/gpasswd -a apache video >/dev/null 2>&1 || :
/usr/bin/gpasswd -a apache dialout >/dev/null 2>&1 || :
# Make sure that service is not automatically re-started on update as
# zmsetup should be run before re-starting to avoid db errors.
if [ $1 -eq 2 ]; then
systemctl stop zoneminder.service > /dev/null 2>&1
fi
/usr/share/rpm-helper/add-service zoneminder $1 zoneminder