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