Sophie

Sophie

distrib > Fedora > 15 > x86_64 > media > os > by-pkgid > a2031803e42346d7843d2e80808b178e > scriptlet

dansguardian-2.10.1.1-4.fc13.x86_64.rpm

PREIN

/bin/sh
getent group dansguardian >/dev/null || groupadd -r dansguardian
getent passwd dansguardian >/dev/null || \
useradd -r -g dansguardian -d /usr/share/dansguardian -s /sbin/nologin \
   -c "DansGuardian web content filter" dansguardian
exit 0

# in the first release we put some user-editable files inside the datadir. doh!
# if they are still there we migrate them over to their new home in the
# sysconfdir.
if [ "$1" -gt 1 ] ; then
    if [ -e /usr/share/dansguardian/lists ] ; then
        mv -f /usr/share/dansguardian/lists /etc/dansguardian
    fi
fi

PREUN

/bin/sh
if [ $1 = 0 ] ; then
    /sbin/service dansguardian stop >/dev/null 2>&1
    /sbin/chkconfig --del dansguardian
    /sbin/service clamd.dansguardian stop >/dev/null 2>&1
    /sbin/chkconfig --del clamd.dansguardian
fi

POSTIN

/bin/sh
/sbin/chkconfig --add clamd.dansguardian
/sbin/chkconfig --add dansguardian

POSTUN

/bin/sh
if [ "$1" -ge "1" ] ; then
    /sbin/service clamd.dansguardian condrestart >/dev/null 2>&1 || :
    /sbin/service dansguardian condrestart >/dev/null 2>&1 || :
fi