PREIN
/bin/sh
/usr/sbin/groupadd -f -r avahi
/usr/bin/id avahi >/dev/null 2>&1 || \
/usr/sbin/useradd -r -g avahi -c 'avahi-daemon' -s /sbin/nologin -d /var/run/avahi-daemon avahi
PREUN
/bin/sh
if [ "$1" -eq 0 ]; then
/sbin/service avahi-daemon stop > /dev/null 2>&1 || :
/sbin/chkconfig --del avahi-daemon
fi
POSTIN
/bin/sh
/sbin/ldconfig
dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || :
# Run avahi-daemon by default:
/sbin/chkconfig --add avahi-daemon >/dev/null 2>&1 || :
if [ "$1" -eq 1 ]; then
if [ -s /etc/localtime ]; then
cp -cfp /etc/localtime /etc/avahi/etc/localtime || :
fi
fi
POSTUN
/bin/sh
/sbin/ldconfig || :
if [ "$1" -ge "1" ]; then
/sbin/service avahi-daemon condrestart >/dev/null 2>&1 || :
fi