Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 2ab30256f4e1bd14e4378681d54b1f8c > scriptlet

apache-mod_gnutls-0.5.5-2mdv2010.0.i586.rpm

POSTIN

/bin/sh
rsafile="/etc/httpd/conf/mod_gnutls/rsafile"
dhfile="/etc/httpd/conf/mod_gnutls/dhfile"

if ! [ -f ${rsafile} -o -f ${dhfile} ]; then
    echo "Creating certificates (this can take quite some time) ..."
    /usr/bin/certtool --generate-privkey --bits 512 --outfile ${rsafile}
    /usr/bin/certtool --generate-dh-params --bits 1024 --outfile ${dhfile}
    chmod 640 ${rsafile} ${dhfile}
    chown apache:root ${rsafile} ${dhfile}
    echo "Done ..."
fi

if [ -f /var/lock/subsys/httpd ]; then
    /etc/rc.d/init.d/httpd restart 1>&2;
fi

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/httpd ]; then
        /etc/rc.d/init.d/httpd restart 1>&2
    fi
fi