Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1cdc7a7a438afc9904decf2a917dc70d > scriptlet

Pound-2.6-1.fc15.i686.rpm

PREIN

/bin/sh
/usr/sbin/groupadd -f -r pound
id pound >/dev/null 2>&1 || \
    /usr/sbin/useradd -r -g pound -d /var/lib/pound -s /sbin/nologin \
    -c "Pound user" pound

PREUN

/bin/sh
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
    /bin/systemctl --no-reload disable pound.service > /dev/null 2>&1 || :
    /bin/systemctl stop pound.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
# generate dummy certificate
exec > /dev/null 2> /dev/null
if [ ! -f /etc/pki/tls/certs/pound.pem ] ; then
pushd /etc/pki/tls/certs
umask 077
cat << EOF | make pound.pem
--
SomeState
SomeCity
Pound Example Certificate
SomeOrganizationalUnit
localhost.localdomain
root@localhost.localdomain
EOF
chown root:pound pound.pem
chmod 640 pound.pem
popd
fi
exit 0

POSTUN

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

Triggers

pound < 2.6-0.2.c

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

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