Sophie

Sophie

distrib > Fedora > 20 > x86_64 > by-pkgid > b734320531376075880aa54ca37a0db9 > scriptlet

Pound-2.6-8.fc20.x86_64.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 
        systemctl --no-reload disable pound.service > /dev/null 2>&1 || : 
        systemctl stop pound.service > /dev/null 2>&1 || : 
fi

POSTIN

/bin/sh

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        systemctl preset pound.service >/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

systemctl daemon-reload >/dev/null 2>&1 || : 
if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        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 || :