Sophie

Sophie

distrib > Fedora > 20 > x86_64 > by-pkgid > 34f5513db10d213cfdb4fce7ef89d395 > scriptlet

pdns-recursor-3.7.3-1.fc20.x86_64.rpm

PREIN

/bin/sh
getent group pdns-recursor > /dev/null || groupadd -r pdns-recursor
getent passwd pdns-recursor > /dev/null || \
    useradd -r -g pdns-recursor -d / -s /sbin/nologin \
    -c "PowerDNS Recursor user" pdns-recursor
exit 0

PREUN

/bin/sh

if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        systemctl --no-reload disable pdns-recursor.service > /dev/null 2>&1 || : 
        systemctl stop pdns-recursor.service > /dev/null 2>&1 || : 
fi

POSTIN

/bin/sh

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        systemctl preset pdns-recursor.service >/dev/null 2>&1 || : 
fi

POSTUN

/bin/sh

systemctl daemon-reload >/dev/null 2>&1 || : 
if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        systemctl try-restart pdns-recursor.service >/dev/null 2>&1 || : 
fi

Triggers

pdns-recursor < 3.3-4

/bin/sh
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply pdns-recursor
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save pdns-recursor >/dev/null 2>&1 ||:

# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del pdns-recursor >/dev/null 2>&1 || :
/bin/systemctl try-restart pdns-recursor.service >/dev/null 2>&1 || :