Sophie

Sophie

distrib > Momonga > development > i686 > media > os > by-pkgid > 7dc62a3878cc38dba5dcbc2246f62f22 > scriptlet

nsd-3.2.13-1m.mo8.i686.rpm

PREIN

/bin/sh
getent group nsd >/dev/null || groupadd -r nsd
getent passwd nsd >/dev/null || \
useradd -r -g nsd -d /etc/nsd -s /sbin/nologin \
-c "nsd daemon account" nsd
exit 0

PREUN

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

POSTIN

/bin/sh
if [ $1 -eq 1 ] ; then 
    # Initial installation 
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

POSTUN

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

Triggers

nsd < 3.2.8-2m

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

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