Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 35474723765e4efebabea22926a77765 > scriptlet

Pound-2.5-1.fc13.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 = 0 ]; then
    /sbin/service pound stop >/dev/null 2>&1
    /sbin/chkconfig --del pound
fi

POSTIN

/bin/sh
/sbin/chkconfig --add pound

# 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
if [ $1 -ge 1 ] ; then
    /sbin/service pound condrestart > /dev/null 2>&1 || :
fi